forked plugin code from automattic and gist from Brad Gessler to create new plugin