'Wordfence', 'sucuri-scanner/sucuri.php' => 'Sucuri', 'better-wp-security/better-wp-security.php' => 'iThemes Security', 'all-in-one-wp-security-and-firewall/wp-security.php' => 'All In One WP Security', ); // Plugins that may need reconfiguration after migration. $reconfigure_plugins = array( 'woocommerce/woocommerce.php' => 'WooCommerce', 'google-site-kit/google-site-kit.php' => 'Google Site Kit', 'mailchimp-for-wp/mailchimp-for-wp.php' => 'Mailchimp', 'wpforms-lite/wpforms.php' => 'WPForms', ); // Cache/optimization plugins that should be reconfigured. $cache_plugins = array( 'wp-super-cache/wp-cache.php' => 'WP Super Cache', 'w3-total-cache/w3-total-cache.php' => 'W3 Total Cache', 'wp-rocket/wp-rocket.php' => 'WP Rocket', 'litespeed-cache/litespeed-cache.php' => 'LiteSpeed Cache', 'autoptimize/autoptimize.php' => 'Autoptimize', ); $found_path_dependent = array(); $found_reconfigure = array(); $found_cache = array(); foreach ( $active_plugins as $plugin ) { if ( isset( $path_dependent_plugins[ $plugin ] ) ) { $found_path_dependent[] = $path_dependent_plugins[ $plugin ]; } if ( isset( $reconfigure_plugins[ $plugin ] ) ) { $found_reconfigure[] = $reconfigure_plugins[ $plugin ]; } if ( isset( $cache_plugins[ $plugin ] ) ) { $found_cache[] = $cache_plugins[ $plugin ]; } } $details = array( 'plugin_count' => $plugin_count, 'path_dependent' => $found_path_dependent, 'need_reconfigure' => $found_reconfigure, 'cache_plugins' => $found_cache, ); $issues = array(); if ( ! empty( $found_path_dependent ) ) { $issues[] = sprintf( /* translators: %s: plugin names */ __( '%s store server paths and may need reinstallation after migration.', '0-day-analytics' ), implode( ', ', $found_path_dependent ) ); } if ( ! empty( $found_cache ) ) { $issues[] = sprintf( /* translators: %s: plugin names */ __( '%s should be cleared and reconfigured after migration.', '0-day-analytics' ), implode( ', ', $found_cache ) ); } if ( $plugin_count > 30 ) { return static::warning( sprintf( /* translators: %d: number of plugins */ __( 'You have %d active plugins. This increases migration complexity - make sure all plugins are compatible with the new server.', '0-day-analytics' ), $plugin_count ), ! empty( $issues ) ? implode( ' ', $issues ) : __( 'Document your plugin list and verify each one works after migration.', '0-day-analytics' ), $details ); } if ( ! empty( $found_path_dependent ) || ! empty( $found_cache ) ) { return static::info( sprintf( /* translators: %d: number of plugins */ __( 'You have %d active plugins. Some will need attention after migration.', '0-day-analytics' ), $plugin_count ), $details ); } return static::pass( sprintf( /* translators: %d: number of plugins */ __( 'You have %d active plugins with no special migration requirements detected. They should transfer smoothly.', '0-day-analytics' ), $plugin_count ), $details ); } } }