Add syntax checking, and fix all syntax errors

This pull requests adds automated syntax checking with travis-ci

I've also corrected all errors in plugins spotted by travis-ci.