In this paper, we present new phase-shifting algorithms (PSAs) that suppress the ripple distortions and spurious pistons in phase-shifting interferometry. These phase errors arise when non-uniform phase-shifting interferograms are processed with PSAs that assume uniform phase shifts. By modeling the non-uniform phase shifts as a polynomial of the unperturbed phase-shift value $\omega_0$ω0, we show that the conditions for eliminating the ripple distortion and the spurious piston are associated with the $m$mth derivative of the PSA's frequency transfer function (FTF). Thus, we propose an approach to design robust algorithms based on the FTF formalism and we present four ready-to-apply PSAs formulas. Finally, our conclusions are supported by computer simulations.