In this work, a photonic crystal fiber (PCF) refractive index (RI) sensor has been designed and optimized. The RIs range covered by the sensor is from 1.38 to 1.41. The proposed optical sensor has three layers of air holes with 24, 12 and 6 holes in each layer. The geometry parameters of the proposed sensor (the radius of the air holes and the thickness of the plasmonic layer) have been optimized using the Nelder-Mead algorithm and the FEM numerical with the objective of achieving the highest sensitivity. To achieve an optimized structure with minimal sensitivity to fabrication errors, the rotation angle of the hole layers has been analyzed. The results indicate that, due to the specific geometry of the proposed structure, variations in the rotation angle and displacement of the air holes have no significant impact on the outcomes. The results also indicate that the sensor’s maximum amplitude sensitivity (AS), maximum wavelength sensitivity (WS), and figure of merit (FOM) are 10000 (RIU−1), 23000 (nm/RIU) and 131 (RIU−1) respectively. The optimized design provides high sensitivity, a wide diagnostic range for the detection of the analytes’ RIs, and the advantages of a gold plasmonic layer, ensuring high stability in biological environments. This combination results in enhanced performance of the sensor for various applications particularly in biosensing and medical fields. The designed structural geometry also eliminates the effects of tolerances in manufacturing processes which makes the proposed PCF device a very efficient sensor.