*/ public static function collect() { global $wpdb; $opcache = function_exists( 'opcache_get_status' ) ? @opcache_get_status( false ) : false; return array( 'PHP' => PHP_VERSION, 'WordPress' => get_bloginfo( 'version' ), 'Memory limit' => ini_get( 'memory_limit' ), 'Max execution' => ini_get( 'max_execution_time' ) . 's', 'OPcache' => ( is_array( $opcache ) && ! empty( $opcache['opcache_enabled'] ) ) ? 'enabled' : 'disabled/unavailable', 'MySQL' => isset( $wpdb->db_server_info ) ? (string) $wpdb->db_server_info() : 'n/a', 'Server' => isset( $_SERVER['SERVER_SOFTWARE'] ) && is_string( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : 'n/a', 'Object cache' => wp_using_ext_object_cache() ? 'external' : 'default', 'GD' => extension_loaded( 'gd' ) ? 'yes' : 'no', 'Imagick' => class_exists( 'Imagick', false ) ? 'yes' : 'no', ); } }