The code for Castle Defence is simply upgrade. Entering it boosts you straight to level 37.
Codes like this are usually left in by the developer for testing and are specific to the Flash release, so they will not carry over to any remastered or mobile version of the game.