I found
http://www.shellcheck.net/
Just paste your code in there and you will get valuable tips. It will by no means replace your head, and sometimes come op with solutions that are plain wrong in your script, but for the most part you will be able to optimise your scripts with it.