[BUGFIX] Check tablename on plugin trigger

Also added documentation
Merge pull request #513 from hmspl/plugin_trigger

[BUGFIX] Check tablename on plugin trigger