private function getPluginInstance(
        $pluginNamespace,
        array $pluginConfiguration
    ) {
        $pluginType = $pluginConfiguration['type'];
        $pluginCategory = $pluginConfiguration['category'];
        $pluginEnabledByDefault = $pluginConfiguration['enabled_by_default'];
        unset($pluginConfiguration['type']);

        $pluginInstance = Plugin::create(
            $pluginNamespace,
            $pluginType,
            $pluginCategory,
            PluginConfiguration::create($pluginConfiguration),
            $pluginEnabledByDefault
        );

        return $pluginInstance;
    }