SILENT KILLERPanel

Current Path: > home > > transcarter > www > wp-content > plugins > wp-optimize > includes


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home//transcarter/www/wp-content/plugins/wp-optimize/includes

NameTypeSizeLast ModifiedActions
blockui Directory - -
fragments Directory - -
list-tables Directory - -
tables Directory - -
backward-compatibility-functions.php File 3311 bytes July 17 2025 21:05:49.
class-re-smush-it-task.php File 5606 bytes July 17 2025 21:05:49.
class-updraft-abstract-logger.php File 3510 bytes July 17 2025 21:05:49.
class-updraft-email-logger.php File 4209 bytes July 17 2025 21:05:49.
class-updraft-file-logger.php File 4362 bytes July 17 2025 21:05:49.
class-updraft-log-levels.php File 911 bytes July 17 2025 21:05:49.
class-updraft-logger-interface.php File 2851 bytes July 17 2025 21:05:49.
class-updraft-logger.php File 4960 bytes July 17 2025 21:05:49.
class-updraft-php-logger.php File 2875 bytes July 17 2025 21:05:49.
class-updraft-ring-logger.php File 4148 bytes July 17 2025 21:05:49.
class-updraft-smush-manager-commands.php File 29110 bytes July 17 2025 21:05:49.
class-updraft-smush-manager.php File 58419 bytes July 17 2025 21:05:49.
class-updraft-smush-task.php File 13294 bytes July 17 2025 21:05:49.
class-updraftcentral-wp-optimize-commands.php File 1193 bytes July 17 2025 21:05:49.
class-wp-optimization.php File 13173 bytes July 17 2025 21:05:49.
class-wp-optimize-404-detector-cron.php File 1058 bytes July 17 2025 21:05:49.
class-wp-optimize-404-detector.php File 11259 bytes July 17 2025 21:05:49.
class-wp-optimize-admin.php File 33078 bytes July 17 2025 21:05:49.
class-wp-optimize-browser-cache.php File 9429 bytes July 17 2025 21:05:49.
class-wp-optimize-commands.php File 37345 bytes July 17 2025 21:05:49.
class-wp-optimize-database-information.php File 17133 bytes July 17 2025 21:05:49.
class-wp-optimize-delay-js.php File 11215 bytes July 17 2025 21:05:49.
class-wp-optimize-gzip-compression.php File 11036 bytes July 17 2025 21:05:49.
class-wp-optimize-heartbeat.php File 4044 bytes July 17 2025 21:05:49.
class-wp-optimize-htaccess.php File 9012 bytes July 17 2025 21:05:49.
class-wp-optimize-http-error-codes-trait.php File 9045 bytes July 17 2025 21:05:49.
class-wp-optimize-install-or-update-notice.php File 3344 bytes July 17 2025 21:05:49.
class-wp-optimize-notices.php File 18660 bytes July 17 2025 21:05:49.
class-wp-optimize-options.php File 16430 bytes July 17 2025 21:05:49.
class-wp-optimize-performance.php File 3555 bytes July 17 2025 21:05:49.
class-wp-optimize-preloader.php File 18543 bytes July 17 2025 21:05:49.
class-wp-optimize-server-information.php File 4941 bytes July 17 2025 21:05:49.
class-wp-optimize-system-status-report.php File 11189 bytes July 17 2025 21:05:49.
class-wp-optimize-table-management.php File 3762 bytes July 17 2025 21:05:49.
class-wp-optimize-transients-cache.php File 3434 bytes July 17 2025 21:05:49.
class-wp-optimize-updates.php File 11273 bytes July 17 2025 21:05:49.
class-wp-optimize-utils.php File 7010 bytes July 17 2025 21:05:49.
class-wp-optimizer.php File 20933 bytes July 17 2025 21:05:49.
class-wpo-activation.php File 2748 bytes July 17 2025 21:05:49.
class-wpo-ajax.php File 12418 bytes July 17 2025 21:05:49.
class-wpo-deactivation.php File 533 bytes July 17 2025 21:05:49.
class-wpo-image-utils.php File 1738 bytes July 17 2025 21:05:49.
class-wpo-page-optimizer.php File 1628 bytes July 17 2025 21:05:49.
class-wpo-uninstall.php File 2654 bytes July 17 2025 21:05:49.
updraftcentral.php File 1704 bytes July 17 2025 21:05:49.

Reading File: /home//transcarter/www/wp-content/plugins/wp-optimize/includes/class-wpo-uninstall.php

<?php
if (!defined('ABSPATH')) die('Access denied.');

if (!class_exists('WPO_Uninstall')) :

class WPO_Uninstall {

	/**
	 * Actions to be performed upon plugin uninstallation
	 */
	public static function actions() {
		WP_Optimize()->get_gzip_compression()->disable();
		WP_Optimize()->get_browser_cache()->disable();
		WP_Optimize()->get_options()->delete_all_options();
		WP_Optimize()->get_minify()->plugin_uninstall();
		WP_Optimize()->get_options()->wipe_settings();
		WP_Optimize()->delete_transients_and_semaphores();
		WP_Optimize()->get_table_management()->delete_plugin_tables();
		Updraft_Tasks_Activation::uninstall(WPO_PLUGIN_SLUG);
		self::delete_wpo_folder();
		if (class_exists('WPO_Gravatar_Data')) {
			wpo_delete_files(WPO_Gravatar_Data::WPO_CACHE_GRAVATAR_DIR);
		}
		
		if (class_exists('WP_Optimize_Lazy_Load')) {
			WP_Optimize_Lazy_Load::instance()->delete_image_cache();
		}
		
		$htaccess_file = self::get_upload_basedir() . '.htaccess';
		if (is_file($htaccess_file) && 0 === filesize($htaccess_file)) {
			wp_delete_file($htaccess_file);
		}
		
		wp_clear_scheduled_hook('process_smush_tasks');
		WP_Optimize()->wpo_cron_deactivate();
	}

	/**
	 * Returns absolute path to uploads folder
	 *
	 * @return string
	 */
	private static function get_upload_basedir() {
		$upload_dir = wp_get_upload_dir();
		return trailingslashit($upload_dir['basedir']);
	}

	/**
	 * Returns an array of sub folders in `uploads/wpo` folder
	 *
	 * @return array
	 */
	private static function get_wpo_sub_folders() {
		$sub_folders =  array(
			'add-type',
			'content-digest',
			'crash-tester',
			'directory-index',
			'header-set',
			'images',
			'module-loaded',
			'rewrite',
			'server-signature',
			'logs',
		);
		return apply_filters('wpo_uploads_sub_folders', $sub_folders);
	}

	/**
	 * Delete `uploads/wpo` sub folders and if it is empty delete the folder itself
	 */
	public static function delete_wpo_folder() {
		$wpo_folder = self::get_upload_basedir() . trailingslashit('wpo');
		require_once WPO_PLUGIN_MAIN_PATH . 'cache/file-based-page-cache-functions.php';
		if (is_dir($wpo_folder)) {
			$wpo_sub_folders = self::get_wpo_sub_folders();
			foreach ($wpo_sub_folders as $folder) {
				wpo_delete_files($wpo_folder . $folder);
			}
			
			// phpcs:disable
			// Generic.PHP.NoSilencedErrors.Discouraged -- suppress warning if it arises due to race condition
			// WordPress.WP.AlternativeFunctions.file_system_operations_rmdir -- Not applicable in this context
			$files = @scandir($wpo_folder);
			if (false === $files) return;
			if (2 === count($files)) {
				@rmdir($wpo_folder);
			}
			// phpcs:enable
		}
	}
}

endif;

SILENT KILLER Tool