Most plant diseases have observable symptoms, and the widely used approach to recognize plant leaf disease is by visually examining the affected plant leaves. A model that might perform the feature extraction without errors will process the classification task successfully. The technology has limitations, such as high parameters, slow detection, and inadequate performance in detecting small dense spots. These factors restrict the practical applications of technology in the field of agriculture. Hence, this work focuses on devising an optimized framework based on YOLOv7 that encompasses pre-processing and hybrid optimization techniques. This proposed YR2S (YOLO-Enhanced Rat Swarm Optimizer -Red Fox Optimization (RFO-ShuffleNetv2) has been devised. After the preprocessing, feature maps are generated using PCFAN. Later, these feature maps are used for the detection of leaves. ShuffleNet with ERSO is used to optimize the classification process. Segmentation of the area prone to disease could be identified through the FCN-RFO. This framework is deployed on the customized dataset, which comprehends images of various plant leaves. The leaf disease dataset is used for simulating and assessing the model. The experimental analysis reveals that the proposed method can effectively classify and detect leaf disease with high accuracy, i.e., 99.69%, outperforming the state-of-the-art approaches in the literature. Practical implication shows that the proposed deep learning classifiers are efficient and highly accurate.