Show debug info in WordPress admin dashboard footer

I like this code snippet. It is very useful!

When you will log in to your WordPress admin dashboard, you will see in footer actual WordPress version, PHP version, server type, and database version. Paste this snippet into your function.php file.

// Show debug info in admin dashboard footer
class VersionInfo
{private $db;public function __construct(\wpdb $wpdb)
{$this->db = $wpdb;
add_action('plugins_loaded', array($this, 'load_text_domain'));
add_filter('update_footer', array($this, 'version_in_footer'), 11);}
public function load_text_domain()
public function version_in_footer()
{$update = core_update_footer();
$wp_version = strpos($update, '<strong>') === 0 ? get_bloginfo('version') . ' (' .
$update . ')' : get_bloginfo('version');
return sprintf(esc_attr__('You are running WordPress %s  | PHP %s | %s | MySQL %s',
'version-info'), $wp_version, phpversion(), $_SERVER['SERVER_SOFTWARE'], $this->
db->get_var('SELECT VERSION();'));}}
global $wpdb;
new VersionInfo($wpdb);