I suggest leaving this one till last, you need to unlock every costume (45) then upgrade said costume(s) which takes 3 stars.
The stars are found in every level most of the time in a chest that needs a gold key or they can be out in the open, it's hard to miss a little blue star.
To unlock each costume you need to play every world twice then buy them from the costume shop they sell from 300-800 gold.
After you have finished the game gotten gold on every level and have every costume but still need to upgrade a few, here's what I did.
Chose a costume, picked the first pirates level, get the upgrade, finish the level and restart.