Removed duplication of logic of an installation manager in a plugin manager

Note: Update after implement #2174