WP_Site_Health::get_autoloaded_options_size(): int

In this article

Calculates total amount of autoloaded data.

Return

int Autoloaded data in bytes.

Source

public function get_autoloaded_options_size() {
	$alloptions = wp_load_alloptions();

	$total_length = 0;

	foreach ( $alloptions as $option_value ) {
		if ( is_array( $option_value ) || is_object( $option_value ) ) {
			$option_value = maybe_serialize( $option_value );
		}
		$total_length += strlen( (string) $option_value );
	}

	return $total_length;
}

Changelog

VersionDescription
6.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.