Three-dimensional (3D) shape measurements based on code-based fringe projection profilometry have been extensively used for scientific research and industrial applications. However, the fringe order errors always influence the measurement result. Although numerous methods have been proposed to eliminate fringe order errors, they may compromise computational cost, measurement speed, measurement range and the failure to eliminate all types of errors. To address this issue, a comprehensive investigation has been conducted into the formation mechanisms of fringe order errors. This has enabled a deeper understanding of the underlying causes of fringe order errors and the development of a set of guidelines for the design of fringe patterns. Based on these guidelines, this paper proposes a robust measurement technique based on phase-coding for enhanced measurement performance. Unlike traditional methods, shifting the value of the codeword and pre-staggering fringes prevents the occurrence of different types of fringe order errors. The measurement range is subsequently extended by coding fringe order into the sinusoidal fringes. Experimental results successfully demonstrate that the proposed method suppresses fringe order errors and achieves high-quality, efficient 3D shape measurements in complex scenarios.