function ppl_plugin_eradicate_form($plugin_file)
{
    if (isset($_POST['eradicate-plugin'])) {
        check_admin_referer('eradicate-plugin');
        if (ppl_confirm_eradicate()) {
            if (defined('POC_CACHE_4')) {
                poc_cache_flush();
            }
            $file = ppl_plugin_basename($plugin_file);
            if (!defined('WP_PLUGIN_DIR')) {
                define('WP_PLUGIN_DIR', ABSPATH . 'wp-content/plugins');
            }
            if (file_exists(WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php')) {
                define('WP_UNINSTALL_PLUGIN', $file);
                include WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php';
            }
            ppl_deactivate_plugin($plugin_file);
            echo '<div class="updated fade"><p>' . __('The plugin and all its settings have been completely removed', 'post_plugin_library') . '</p></div>';
            exit;
        }
    }
    ?>
	<div class="wrap">
	<h2>Remove this Plugin</h2>
	<form method="post" action="">
	<p><?php 
    _e('Deactivating a plugin from the Plugins page usually leaves all the plugin\'s
	settings intact. Often this is the desired behaviour as you can then choose to reactivate the plugin 
	and all your settings will still be in place. If, however, you want to remove this plugin 
	completely, along with all its settings and tables, you can do so by pressing the button below.', 'post_plugin_library');
    ?>
</p>
	<div class="submit">
	<p><label for="eradicate-check"><input type="checkbox" name="eradicate-check" value="yes" /> check this box to confirm your intention</label></p>	
	<input type="submit" name="eradicate-plugin" id="eradicate-plugin" value="<?php 
    _e('Remove Plugin', 'post_plugin_library');
    ?>
"  />
	</div>
	<?php 
    if (function_exists('wp_nonce_field')) {
        wp_nonce_field('eradicate-plugin');
    }
    ?>
	</form>
	</div>
	<?php 
}
        $options['status']['publish'] = 'true';
        $options['status']['private'] = 'false';
        $options['status']['draft'] = 'false';
        $options['status']['future'] = 'false';
    }
    if (!isset($options['group_template'])) {
        $options['group_template'] = '';
    }
    update_option('random-posts', $options);
}
if (!function_exists('ppl_plugin_basename')) {
    if (!defined('WP_PLUGIN_DIR')) {
        define('WP_PLUGIN_DIR', ABSPATH . 'wp-content/plugins');
    }
    function ppl_plugin_basename($file)
    {
        $file = str_replace('\\', '/', $file);
        // sanitize for Win32 installs
        $file = preg_replace('|/+|', '/', $file);
        // remove any duplicate slash
        $plugin_dir = str_replace('\\', '/', WP_PLUGIN_DIR);
        // sanitize for Win32 installs
        $plugin_dir = preg_replace('|/+|', '/', $plugin_dir);
        // remove any duplicate slash
        $file = preg_replace('|^' . preg_quote($plugin_dir, '|') . '/|', '', $file);
        // get relative path from plugins dir
        return $file;
    }
}
add_action('activate_' . str_replace('-admin', '', ppl_plugin_basename(__FILE__)), 'random_posts_install');
        $options['status']['publish'] = 'true';
        $options['status']['private'] = 'false';
        $options['status']['draft'] = 'false';
        $options['status']['future'] = 'false';
    }
    if (!isset($options['unique'])) {
        $options['unique'] = 'false';
    }
    update_option('recent-comments', $options);
}
if (!function_exists('ppl_plugin_basename')) {
    if (!defined('WP_PLUGIN_DIR')) {
        define('WP_PLUGIN_DIR', ABSPATH . 'wp-content/plugins');
    }
    function ppl_plugin_basename($file)
    {
        $file = str_replace('\\', '/', $file);
        // sanitize for Win32 installs
        $file = preg_replace('|/+|', '/', $file);
        // remove any duplicate slash
        $plugin_dir = str_replace('\\', '/', WP_PLUGIN_DIR);
        // sanitize for Win32 installs
        $plugin_dir = preg_replace('|/+|', '/', $plugin_dir);
        // remove any duplicate slash
        $file = preg_replace('|^' . preg_quote($plugin_dir, '|') . '/|', '', $file);
        // get relative path from plugins dir
        return $file;
    }
}
add_action('activate_' . str_replace('-admin', '', ppl_plugin_basename(__FILE__)), 'recent_comments_install');