Code classification is essential nowadays, as determining the transmission code at the receiver side is a challenge. A novel algorithm for fixed right shift (FRS) code may be employed in embedded next-generation optical fiber communication (OFC) systems. The code aims to provide various quality of services (QoS): audio, video, and data. The Q-factor, bit error rate (BER), and signal-to-noise ratio (SNR) are studied to be used as predictors for machine learning (ML) and used in the design of an embedded QoS classifier. The hypothesis test is used to prove the ML input data robustness. Pearson’s correlation and variance-inflation factor (VIF) are revealed, as they are typical detectors of a data multicollinearity problem. The hypothesis testing shows that the statistical properties for the samples of Q-factor, BER, and SNR are similar to the population dataset, with p-values of 0.98, 0.99, and 0.97, respectively. Pearson’s correlation matrix shows a highly positive correlation between Q-factor and SNR, with 0.9. The highest VIF value is 4.5, resulting in the Q-factor. In the end, the ML evaluation shows promising results as the decision tree (DT) and the random forest (RF) classifiers achieve 94% and 99% accuracy, respectively. Each case’s receiver operating characteristic (ROC) curves are revealed, showing that the RF outperforms the DT classification performance.