Refactor and add tests for plugins.py

Improvement to the tests currently being run on ``plugins.py``

related #644 
https://github.com/Freeseer/freeseer/issues/644 added and updated the code comment