Modify the way we fetch the installed version of the plugin

Fixes #2025

Fixes #2063
Use detect call to simplify it after review

Fixes #2063