Fixes #5030 deprecates determining plugin from debug backtrace
namespaced private plugins functions and updated deprecated function usage
Merge pull request #5669 from cash/plugin_calling

Fixes #5030 deprecates determining plugin from debug backtrace