We discuss the optical properties of one-dimensional ultrathin subwavelength, metallic gratings under transverse magnetic excitation, with particular attention to the phenomenon of quenched transmission, recently highlighted in several optical experiments. In particular, we consider a grating with thickness comparable to or less than the metal skin depth, showing how the geometrical properties of the grating can dramatically modify its transmission properties, often in a counterintuitive way. We study the role played by short-range and long-range surface plasmons (SPs) and localized SP resonances, showing that quenched transmission must be ascribed to localized resonance effects, while long-range and short-range SPs play only a marginal role in this anomalous effect.