public function havePlugin($path, $code)
    {
        $fullPath = $this->config['plugins'] . Utils::unleadslashit($path);
        $dir = dirname($fullPath);
        if (!@mkdir($dir, 0777, true) && !is_dir($dir)) {
            throw new ModuleException(
                __CLASS__,
                "Could not create [{$dir}] plugin folder."
            );
        }
        $slug = basename(dirname($path));
        $code = $this->removeOpeningPhpTag($code);
        $name = $slug;
        $contents = <<<PHP
<?php
/*
Plugin Name: $name
Description: $name
*/

$code
PHP;

        $put = file_put_contents($fullPath, $contents);

        if (!$put) {
            throw new ModuleException(
                __CLASS__,
                "Could not create [{$fullPath}] plugin file."
            );
        }

        $this->toClean[] = $dir;
    }