We considered a porous thin film as a platform for optical sensing. It is envisaged that the porous thin film becomes infiltrated by a fluid containing an agent to be sensed. The basis for detection of this agent to be sensed is provided by changes in the optical properties of the infiltrated porous thin film. Provided that the pore sizes are much smaller than the wavelengths involved, the infiltrated porous thin film may be regarded as a homogenized composite material. Using the well-established Bruggeman homogenization formalism, the sensitivity of such an optical sensor was investigated theoretically. The sensitivity was considered in relation to the optical properties of the porous thin film and the infiltrating fluid, the porosity of the thin film, and the shape of the pores. For the case of an isotropic dielectric porous thin film of relative permittivity < a and an isotropic dielectric fluid of relative permittivity <b, the sensitivity was found to be maximized if: (i) the contrast between <a and <b was maximized; (ii) mid-range values of porosity were used; (iii) the regime 0 < <b < 1 with <a < 1 pertained, for example; and (iv) pores which have elongated spheroidal shapes were incorporated.