Herein, we present a smart enzymatic sensor based on nanoporous anodic alumina (NAA) and its photoluminescence (PL) in the UV-visible range. The as-produced structure of NAA is functionalized and activated in order to perform the enzyme immobilization in a controlled manner. The whole process is monitored through the PL spectrum and each stage is characterized by an exclusive barcode, which is associated with the PL oscillations. This characteristic property allows us to calculate the change in the effective optical thickness that takes place after each stage. This makes it possible to accurately detect and quantify the immobilized enzyme within the NAA structure. Finally, the NAA geometry (i.e., the pore length and its diameter) is optimized, to improve the enzyme immobilization and its detection inside the pores. This enzymatic sensor can give quick and accurate measurements of enzyme levels, what is crucial in clinical enzymology to prevent and detect diseases at their primary stage.