WP_Site_Health
class WP_Site_Health
// Constructor: function Object() { [native code] } Class for looking up a site's health based on a user's WordPress environment.
Methods 51 methods
| Method / Return | Description |
|---|---|
| __construct() void | WP_Site_Health constructor. |
| show_site_health_tab() void | Outputs the content of a tab in the Site Health screen.
Parameters: $tab: mixed |
| get_instance() (WP_Site_Health | Returns an instance of the WP_Site_Health class, or create one if none exist yet. |
| enqueue_scripts() void | Enqueues the site health scripts. |
| perform_test() (mixed | Runs a Site Health test directly.
Parameters: $callback: mixed |
| prepare_sql_data() void | Runs the SQL version checks. |
| check_wp_version_check_exists() void | Tests whether `wp_version_check` is blocked. |
| get_test_wordpress_version() array | Tests for WordPress version and outputs it. |
| get_test_plugin_version() array | Tests if plugins are outdated, or unnecessary. |
| get_test_theme_version() array | Tests if themes are outdated, or unnecessary. |
| get_test_php_version() array | Tests if the supplied PHP version is supported. |
| test_php_extension_availability() bool | Checks if the passed extension or function are available.
Parameters: $extension_name: mixed, $function_name: mixed, $constant_name: mixed, $class_name: mixed |
| get_test_php_extensions() array | Tests if required PHP modules are installed on the host. |
| get_test_php_default_timezone() array | Tests if the PHP default timezone is set to UTC. |
| get_test_php_sessions() array | Tests if there's an active PHP session that can affect loopback requests. |
| get_test_sql_server() array | Tests if the SQL server is up to date. |
| get_test_dotorg_communication() array | Tests if the site can communicate with WordPress.org. |
| get_test_is_in_debug_mode() array | Tests if debug information is enabled. |
| get_test_https_status() array | Tests if the site is serving content over HTTPS. |
| get_test_ssl_support() array | Checks if the HTTP API can handle SSL/TLS requests. |
| get_test_scheduled_events() array | Tests if scheduled events run as intended. |
| get_test_background_updates() array | Tests if WordPress can run automated background updates. |
| get_test_plugin_theme_auto_updates() array | Tests if plugin and theme auto-updates appear to be configured correctly. |
| get_test_available_updates_disk_space() array | Tests available disk space for updates. |
| get_test_update_temp_backup_writable() array | Tests if plugin and theme temporary backup directories are writable or can be created. |
| get_test_loopback_requests() array | Tests if loopbacks work as expected. |
| get_test_http_requests() array | Tests if HTTP requests are blocked. |
| get_test_rest_availability() array | Tests if the REST API is accessible. |
| get_test_file_uploads() array | Tests if 'file_uploads' directive in PHP.ini is turned off. |
| get_test_authorization_header() array | Tests if the Authorization header has the expected values. |
| get_test_page_cache() array | Tests if a full page cache is available. |
| get_test_persistent_object_cache() array | Tests if the site uses persistent object cache and recommends to use it if not. |
| get_autoloaded_options_size() int | Calculates total amount of autoloaded data. |
| get_test_autoloaded_options() array | Tests the number of autoloaded options. |
| get_tests() array | Returns a set of tests that belong to the site status page. |
| admin_body_class() string | Adds a class to the body HTML tag.
Parameters: $body_class: mixed |
| wp_schedule_test_init() void | Initiates the WP_Cron schedule test cases. |
| get_cron_tasks() void | Populates the list of cron events and store them to a class-wide variable. |
| has_missed_cron() (bool | Checks if any scheduled tasks have been missed. |
| has_late_cron() (bool | Checks if any scheduled tasks are late. |
| detect_plugin_theme_auto_update_issues() object | Checks for potential issues with plugin and theme auto-updates. |
| can_perform_loopback() object | Runs a loopback test on the site. |
| maybe_create_scheduled_event() void | Creates a weekly cron event, if one does not already exist. |
| wp_cron_scheduled_check() void | Runs the scheduled event to check and update the latest site health status for the website. |
| is_development_environment() bool | Checks if the current environment type is set to 'development' or 'local'. |
| get_page_cache_headers() array | Returns a list of headers and its verification callback to verify if page cache is enabled or not. |
| check_for_page_caching() (WP_Error | Checks if site has page cache enabled or not. |
| get_page_cache_detail() (WP_Error | Gets page cache details. |
| get_good_response_time_threshold() int | Gets the threshold below which a response time is considered good. |
| should_suggest_persistent_object_cache() bool | Determines whether to suggest using a persistent object cache. |
| available_object_cache_services() string[] | Returns a list of available persistent object cache services. |
Properties
| Property / Type | Description |
|---|---|
| $instance mixed public | No description available. |
| $is_acceptable_mysql_version mixed public | No description available. |
| $is_recommended_mysql_version mixed public | No description available. |
| $is_mariadb mixed public | No description available. |
| $mysql_server_version mixed public | No description available. |
| $mysql_required_version mixed public | No description available. |
| $mysql_recommended_version mixed public | No description available. |
| $mariadb_recommended_version mixed public | No description available. |
| $php_memory_limit mixed public | No description available. |
| $schedules mixed public | No description available. |
| $crons mixed public | No description available. |
| $last_missed_cron mixed public | No description available. |
| $last_late_cron mixed public | No description available. |
| $timeout_missed_cron mixed public | No description available. |
| $timeout_late_cron mixed public | No description available. |