# code-profiler/1.5/uninstall.php

Code Profiler – WordPress Performance Profiling and Debugging Made Easy, version 1.5. 46 lines.

- Page: https://pluginprobe.com/plugins/code-profiler/1.5/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/code-profiler/1.5/raw/uninstall.php
- Modified: 2022-09-12T08:08:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-profiler/1.5/code/uninstall.php#L10-L20`.

```php
<?php
/*
 +=====================================================================+
 |    ____          _        ____             __ _ _                   |
 |   / ___|___   __| | ___  |  _ \ _ __ ___  / _(_) | ___ _ __         |
 |  | |   / _ \ / _` |/ _ \ | |_) | '__/ _ \| |_| | |/ _ \ '__|        |
 |  | |__| (_) | (_| |  __/ |  __/| | | (_) |  _| | |  __/ |           |
 |   \____\___/ \__,_|\___| |_|   |_|  \___/|_| |_|_|\___|_|           |
 |                                                                     |
 |  (c) Jerome Bruandet ~ https://code-profiler.com/                   |
 +=====================================================================+
*/

if (! defined('WP_UNINSTALL_PLUGIN') ) { exit('Not allowed'); }

// =====================================================================
// Code Profiler's uninstaller (database + files).

$cp_options = get_option('code-profiler');

global $wp_filesystem;
require_once ABSPATH .'wp-admin/includes/file.php';
WP_Filesystem();

define('CODE_PROFILER_VERSION', '1');
require_once 'lib/helper.php';

if ( $wp_filesystem->exists( WPMU_PLUGIN_DIR .'/'. CODE_PROFILER_MUPLUGIN ) ) {
	$wp_filesystem->delete( WPMU_PLUGIN_DIR .'/'. CODE_PROFILER_MUPLUGIN, false, 'f');
}

// Delete options in the DB
delete_option('code-profiler');

// Delete profiles on disk (optional)
//~ if (! empty( $cp_options['uninstall_delete_profiles'] ) ) {
	// Find and recursively delete any files and folders
	// located inside the profiles directory:
	$wp_filesystem->delete( CODE_PROFILER_UPLOAD_DIR, true, 'd');
//~ }

return;

// =====================================================================
// EOF

```
