fix(events): makes the plugin_id parameter reliable for plugin events

Some plugin methods trigger events which include a "plugin_id" parameter.
In some cases this parameter was unavailable. This makes sure it's always
available.