[BUGFIX] Check tablename on plugin trigger

Also added documentation