In this paper, a D-shaped optical fiber plasmonic sensor using planar and grating structures of silver and gold metals is simulated using the finite element method under the wave optics module of COMSOL Multiphysics. Performance defining parameters are based on (i) the transmittance curve, viz., resonance wavelength (λ r), shift in resonance wavelength (Δ λ r), minimum transmittance (T m i n ), and bandwidth (BW), and (ii) on electric field distribution of a surface plasmon wave, viz., penetration depth (PD) and propagation length (PL) obtained for the considered sensor structures. It is found that gold gives wider BW than silver (e.g.,at 1.39 refractive index of the sample: 480% for the planar case and 241% for the grating case), which deteriorates sensor performance by degrading detection accuracy. However, gold gives higher Δ λ r than silver (at 1.40-1.39=0.01 change in refractive index of the sample: 18.33% for the planar case and 16.39% for the grating case), which improves sensor performance and enhances sensitivity. A grating slightly increases the BW and Δ λ r for both gold and silver. Further, with respect to silver, the sensor that contains gold demonstrates higher PD (e.g.,22.32% at 1.39 refractive index of the sample for the planar case) and lower PL (e.g.,22.74% at 1.39 refractive index of sample for the planar case). A grating increases the PD (e.g.,10% for silver at 1.39 refractive index of the sample), whereas it decreases the PL (e.g.,8.73% for silver at 1.39 refractive index of the sample). Lower PL signifies the localization of the field, whereas higher PD enables the sensor to detect larger molecules. Therefore, the sensor with grating metals provides better sensitivity with reduced detection accuracy for the detection of comparatively larger molecules.