PluginProbe ʕ •ᴥ•ʔ
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) / 9.5.3
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) v9.5.3
9.5.11 9.5.10.1 9.5.10 trunk 9.4.0 9.4.1 9.4.2 9.4.3 9.5.0 9.5.0.1 9.5.0.2 9.5.1 9.5.2 9.5.2.2 9.5.2.3 9.5.3 9.5.3.1 9.5.3.2 9.5.4 9.5.5 9.5.6 9.5.7 9.5.8 9.5.9
really-simple-ssl / uninstall.php
really-simple-ssl Last commit date
assets 7 months ago core 7 months ago languages 7 months ago lets-encrypt 7 months ago lib 7 months ago mailer 7 months ago modal 7 months ago placeholders 7 months ago progress 7 months ago security 7 months ago settings 7 months ago testssl 7 months ago upgrade 7 months ago .wp-env.json 7 months ago SECURITY.md 7 months ago class-admin.php 7 months ago class-cache.php 7 months ago class-certificate.php 7 months ago class-front-end.php 7 months ago class-installer.php 7 months ago class-mixed-content-fixer.php 7 months ago class-multisite.php 7 months ago class-server.php 7 months ago class-site-health.php 7 months ago class-wp-cli.php 7 months ago compatibility.php 7 months ago force-deactivate.txt 7 months ago functions.php 7 months ago index.php 7 months ago readme.txt 7 months ago rector.php 7 months ago rlrsssl-really-simple-ssl.php 7 months ago rsssl-auto-loader.php 7 months ago sbom.json.gz 7 months ago ssl-test-page.php 7 months ago system-status.php 7 months ago uninstall.php 7 months ago upgrade.php 7 months ago
uninstall.php
202 lines
1 <?php
2 // If uninstall is not called from WordPress, exit
3 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
4 exit();
5 }
6
7 if ( defined('RSSSL_UPGRADING_TO_PRO') ) {
8 exit();
9 }
10
11 $rsssl_settings = get_option( 'rsssl_options' );
12 if ( isset( $rsssl_settings['delete_data_on_uninstall'] ) && $rsssl_settings['delete_data_on_uninstall'] ) {
13 $rsssl_options = [
14 "rsssl_enable_csp_defaults",
15 "rsssl_elementor_upgraded",
16 "rsssl_redirect_to_http_check",
17 "rsssl_pro_permissions_policy_headers_for_php",
18 "rsssl_license_attempts",
19 "rsssl_csp_report_url",
20 "rsssl_iteration",
21 "rsssl_scan",
22 "rsssl_progress",
23 "rsssl_current_action",
24 "rsssl_scan_type",
25 "rsssl_scan_active",
26 "rsssl_xmlrpc_db_version",
27 "rsssl_first_version",
28 "rsssl-pro-current-version",
29 "rsssl_xmlrpc_learning_mode_activation_time",
30 "rsssl_pro_defaults_set",
31 "rsssl_after_default_setup_completed",
32 "rsssl_ms_elementor_private_replace_progress",
33 "rsssl_ms_elementor_urls_upgraded",
34 "rsssl_ms_elementor_public_replace_progress",
35 "rsssl_csp_report_only_activation_time",
36 "rsssl_csp_report_token",
37 "rsssl_key",
38 "rsssl_transients",
39 "rsssl_pro_license_activation_limit",
40 "rsssl_ssl_verify",
41 "rsssl_pro_license_activations_left",
42 "rsssl_pro_license_expires",
43 "rsssl_csp_db_version",
44 "rsssl_debug_log_folder_suffix",
45 "rsssl_xmlrpc_learning_mode_activation_time",
46 "rsssl_port_check_2082",
47 "rsssl_port_check_8443",
48 "rsssl_port_check_2222",
49 "rsssl_csp_db_upgraded",
50 "rsssl_scan_completed_no_errors",
51 "rsssl_last_scan_time",
52 "rsssl_test_wp_login_available",
53 "rsssl_country_db_version",
54 "rsssl_country_import_version",
55 "rsssl_geo_ip_database_file",
56 "rsssl_login_attempts_db_version",
57 'rsssl_notification_email',
58 'rsssl_remaining_tasks',
59 'rsssl_activation_timestamp',
60 'rsssl_activation_timestamp',
61 'rsssl_flush_caches',
62 'rsssl_skip_dns_check',
63 'rsssl_skip_challenge_directory_request',
64 'rsssl_hosting_dashboard',
65 'rsssl_options',
66 'rsssl_le_dns_tokens',
67 'rsssl_le_dns_records_verified',
68 'rsssl_private_key_path',
69 'rsssl_certificate_path',
70 'rsssl_intermediate_path',
71 'rsssl_le_certificate_generated_by_rsssl',
72 'rsssl_ssl_dirname',
73 'rsssl_create_folders_in_root',
74 'rsssl_htaccess_file_set_',
75 'rsssl_initial_alias_domain_value_set',
76 'rsssl_le_start_renewal',
77 'rsssl_le_start_installation',
78 'rsssl_le_installation_progress',
79 'rsssl_activation_time',
80 'rsssl_le_certificate_installed_by_rsssl',
81 'rsssl_installation_error',
82 'rsssl_le_dns_configured_by_rsssl',
83 'rsssl_onboarding_dismissed',
84 'rsssl_ssl_detection_overridden',
85 'rsssl_http_methods_allowed',
86 'rsssl_show_onboarding',
87 'rsssl_deactivate_list',
88 'rsssl_firewall_error',
89 'rsssl_completed_fixes',
90 'rsssl_rest_api_optimizer_not_writable',
91 'rsssl_ssl_labs_data',
92 'rsssl_current_version',
93 'rsssl_network_activation_status',
94 'rsssl_run',
95 'rsssl_wp_version_detected',
96 'rsssl_admin_notices',
97 'rsssl_plusone_count',
98 'rsssl_siteprocessing_progress',
99 'rsssl_ssl_activation_active',
100 'rsssl_network_activation_status',
101 'rsssl_siteprocessing_progress',
102 'rsssl_header_detection_nonce',
103 'rsssl_htaccess_error',
104 'rsssl_htaccess_rules',
105 'rsssl_options',
106 'rsssl_404_cache',
107 'rsssl_404_notice_shown',
108 'rsssl_key',
109 'rsssl_change_detection_next_index',
110 'rsssl_change_detection_completed',
111 'rsssl_change_detection_mail_recently_sent',
112 'rsssl_files_with_wrong_permissions',
113 'rsssl_permissions_mail_recently_sent',
114 'rsssl_permission_check_next_index',
115 'rsssl_permission_check_completed',
116 'rsssl_homepage_contains_404_resources',
117 'rsssl_pro_password_change_required_users_checked',
118 'rsssl_activated_recommended_features_extendify',
119 'rsssl_pro_redirect_to_settings_page',
120 'rsssl_redirect_to_settings_page',
121 'rsssl_firewall_environment_signature',
122 'rsssl_csp_header_test_status',
123 'rsssl_csp_header_test_status_expiry',
124 'rsssl_permalink_changed_to_plain',
125 ];
126 foreach ( $rsssl_options as $rsssl_option_name ) {
127 delete_option( $rsssl_option_name );
128 delete_site_option( $rsssl_option_name );
129 }
130 $rsssl_transients = [
131 'rsssl_tls_version',
132 'rsssl_redirects_to_homepage',
133 'rsssl_cert_expiration_date',
134 'rsssl_sent_cert_expiration_warning',
135 'rsssl_scan_post_count',
136 'rsssl_scan',
137 'rsssl_stop_certificate_expiration_check',
138 'rsssl_pro_license_status',
139 'rsssl_xmlrpc_allowed',
140 'rsssl_http_methods_allowed',
141 'rsssl_code_execution_allowed_status',
142 'rsssl_directory_indexing_status',
143 'rsssl_htaccess_test_success',
144 'rsssl_can_use_curl_headers_check',
145 'rsssl_curl_error',
146 'rsssl_mixed_content_fixer_detected',
147 'rsssl_admin_notices',
148 'rsssl_plusone_count',
149 'rsssl_testpage',
150 'rsssl_plugin_download_active',
151 'rsssl_le_generate_attempt_count',
152 'rsssl_alias_domain_available',
153 'rsssl_le_install_attempt_count',
154 'rsssl_cw_t',
155 'rsssl_cw_server_id',
156 'rsssl_certinfo',
157 'rsssl_csp_header_test_status',
158 ];
159 foreach ( $rsssl_transients as $rsssl_transient ) {
160 delete_transient( $rsssl_transient );
161 delete_site_transient( $rsssl_transient );
162 }
163
164 require_once(ABSPATH . 'wp-admin/includes/file.php');
165 WP_Filesystem();
166
167 function rsssl_delete_directory_wpfilesystem($dir) {
168 global $wp_filesystem;
169 if ($wp_filesystem->is_dir($dir)) {
170 $objects = $wp_filesystem->dirlist($dir);
171 foreach ($objects as $object => $objectdata) {
172 if ($wp_filesystem->is_dir($dir . "/" . $object)) {
173 rsssl_delete_directory_wpfilesystem($dir . "/" . $object);
174 }
175 else {
176 $wp_filesystem->delete($dir . "/" . $object);
177 }
178 }
179 $wp_filesystem->rmdir($dir);
180 }
181 }
182
183 $upload_dir = wp_upload_dir();
184 $really_simple_ssl_dir = $upload_dir['basedir'] . '/really-simple-ssl';
185 rsssl_delete_directory_wpfilesystem($really_simple_ssl_dir);
186
187 global $wpdb;
188 $table_names = array(
189 $wpdb->base_prefix . 'rsssl_csp_log',
190 $wpdb->base_prefix . 'rsssl_xmlrpc',
191 $wpdb->base_prefix . 'rsssl_country',
192 $wpdb->base_prefix . 'rsssl_login_attempts',
193 $wpdb->base_prefix . 'rsssl_geo_block',
194 $wpdb->base_prefix . 'rsssl_event_logs',
195 );
196
197 foreach($table_names as $table_name){
198 $sql = "DROP TABLE IF EXISTS $table_name";
199 $wpdb->query($sql);
200 }
201 }
202