In terms of level design, the second world is the most interesting. You'll have to explore multiple branches of each stage, some optional and some not. The Wind Cave has you go back and forth between its two endpoints a few times, for instance, and Fossil Rock has a huge vertical climb that's totally optional. But the backtracking never gets too crazy and layered (like the Mine) and the stages never get too long (like those in world 4).
Deviant Den has the best balance of everything. Some rooms are open wide, allowing you to wander and find either items or the path forward. Some rooms are tight, carving a labyrinthine path and setting up strict enemy encounters. The best part: when you reach the end of the stage, you can buy new weapons. Then, you have to backtrack through the stage, only this time you can try out your new gear. Popful Mail usually doesn't mind sending you back and forth over the same piece of land without any difference (see: Wind Cave), but this gives you a chance to get familiar with how your new weapons work. The jagged platforming highlights the usefulness of aiming Tatto's shots with the Thunder Rod, too.