Critical wall perturbations and a local free energy functional