This study investigates the impact of partial shading on photovoltaic (PV) modules and presents a novel variable step size perturb and observe (P&O) algorithm with a checking mechanism to improve maximum power point tracking (MPPT) efficiency. The research highlights the challenges posed by partial shading, such as reduced voltage and current output and the existence of multiple maximum power points, complicating traditional MPPT methods. Utilizing MATLAB simulations and experimental validation, the proposed algorithm aims to enhance power extraction from PV systems under varying irradiation conditions.