From Sonic Retro
The Perfect Bonus is a bonus the player is able to receive in certain games in the Sonic the Hedgehog series. It has different requirements and rewards depending on the game, in most cases requiring the player collect Rings.
Behavior in games
To earn a Perfect Bonus in Sonic 2, the player has to collect all the Rings in a level. This does not include Rings earned from Super Ring monitors. The player is awarded 50,000 points at the end of an Act. However, some levels have Rings placed in odd locations such as hidden within walls or far beyond the player's reach, therefore making a Perfect Bonus impossible to achieve. More information can be found here.
A Perfect Bonus can also be achieved in the Special Stages, again by collecting every single Ring that appears, however it is an extremely difficult task as it requires playing the game with both Sonic and Tails. Tails has to collect the Rings Sonic's hitbox alone can't reach, and two players will need an extreme amount of coordination and memorisation for the Special Stages due to their difficult design and loose Ring placement. Some stages have Ring placements that make the Perfect Bonus impossible to achieve even in a tool-assisted speedrun, such as the seventh one with its random-scatter Ring pattern in the third section.
To earn a Perfect Bonus in Sonic 3 or in Sonic & Knuckles, the player must collect all the Rings in a Special Stage. This not only includes free-floating Rings in the Special Stage, but also Rings that are generated when a rectangular perimeter of blue spheres is cleared. The player is awarded 50,000 points at the end of the Special Stage for collecting all Rings, regardless of if the player earned the Chaos Emerald at the end of the Special Stage.
There is no Perfect Bonus in Blue Sphere, as there is no score in this game. However, collecting all Rings in a stage allows the player to see the difficulty level of the stage just completed and allows them to skip ten stages.
In Sonic Generations, the Perfect Bonus is known as a Perfect Clear, though is still addressed as a "Perfect Bonus" in the manual. To earn a Perfect Clear, the player must simply complete a level without dying. The bonus raises their Rank for the level by one and is necessary to gain S-Ranks in this game. Perfect Clears are achieved in the HD versions of the game; they are not present in the Nintendo 3DS version.
Perfect Bonuses are earned in the Blue Spheres Bonus Stage, and are earned in the same way as in Sonic 3 & Knuckles by collecting every Ring. This causes the Medallion earned at the end of the Bonus Stage to become gold. While only silver medallions are needed to unlock all of the game's extra content, collecting all the gold medallions will award an achievement/trophy.
Perfect Bonuses are earned in the Bonus Stage by collecting every Ring in the maze, with the game awarding 10,000 points at the end of the Bonus Stage for doing so. Achieving a Perfect Bonus for the first time will also unlock Metal NiGHTS parts and purple paint in the shop to customise Metal Fighters with in Battle mode.
Getting a Perfect Bonus in a Special Stage in Sonic 2.
The screen shown in Blue Sphere when getting a Perfect.