move plugin search to BasePlugin