/**
* Fetches the sizes of the WordPress directories: `wordpress` (ABSPATH), `plugins`, `themes`, and `uploads`.
* Intended to supplement the array returned by `WP_Debug_Data::debug_data()`.
*
* @since 5.2.0
*
* @return array The sizes of the directories, also the database size and total installation size.
*/
public static function get_sizes() { $size_db = self::
get_database_size();
$upload_dir =
wp_get_upload_dir();
/*
* We will be using the PHP max execution time to prevent the size calculations
* from causing a timeout. The default value is 30 seconds, and some
* hosts do not allow you to read configuration values.
*/
if ( function_exists( 'ini_get'
) ) { $max_execution_time =
ini_get( 'max_execution_time'
);
}