Refactor and add tests for plugins.py

Improvement to the tests currently being run on ``plugins.py``

related #644 
I find this comment confusing, and it's probably not needed since the docstring is pretty descriptive. If you want to keep it, try rewording it and adding it to the docstring.