core: refactor common plugin verify logic into separate methods
core: refactor common code for getting new plugin id to a separate method