"Immature" blocks should be valid, but they require 100-120 confirmations before they can be spent. On testnet this may take up to 40 hours or so. If you have the block hash (it should be in debug.log
if not elsewhere), you ought to be able to find these blocks on http://blockexplorer.com/testnet and see them linked into the block chain.
"Orphaned" blocks can happen if you find a block, but unbeknown to you, someone else has already found a block linked to the same parent. This seems to be more common on testnet, which doesn't seem to be very efficient at propagating newly found blocks. (I don't know why, perhaps there are a lot of experimental clients which don't relay blocks properly.) This can especially happen due to the 20-minute rule on testnet, whereby if no block is found within 20 minutes of the last one, the difficulty temporarily drops to 1. When this happens, typically lots of people find a block within a few seconds, and there is a race to see whose will be propagated and accepted first. So every time this happens, there's a good chance you'll find a block at difficulty 1, but an even better chance that someone beat you to it, and your block will be orphaned.