Refactor runPlugin(plugin) out of runPlugins().