Quantitative theoretical study of the plasmon anomalies of diffraction gratings