This is a simple piece of code to provide basic information about your blog.
The first lines of the code will restrict the PHP access to the command line interface (CLI) so not just anyone could/should be able to see the details.
Additional Mime Types can be seen at: http://codex.wordpress.org/Function_Reference/get_allowed_mime_types
php wp-info.php
# php wp-info.php WordPress Site Name: Test Blog WordPress Site URL: http://www.testblog.com WordPress Current Template: twentysixteen WordPress Admin Email: david@testblog.com Total Blog Posts: 483 Auto-Draft Posts: 2 Draft Posts: 3 Inherit Posts: 0 Private Posts: 66 Publish Posts: 412 Total Blog Pages: 6 Auto-Draft Pages: 0 Draft Pages: 1 Inherit Pages: 0 Private Pages: 0 Publish Pages: 5 Total Blog Uploads: 117 Image Uploads: 113 Audio Uploads: 0 Archive Uploads: 2 Total Users: 2 Administrator Users: 1 Editor Users: 0 Author Users: 0 Contributor Users: 0 Subscriber Users: 1
<?PHP // Restrict access to this file - start if (php_sapi_name() != 'cli') { exit; } // Restrict access to this file - stop require_once('wp-blog-header.php') ; echo "\nWordPress Site Name: " . get_option( 'blogname', false); echo "\nWordPress Site URL: " . get_option( 'siteurl', false); echo "\nWordPress Current Template: " . get_option( 'template', false); echo "\nWordPress Admin Email: " . get_option( 'admin_email', false)."\n"; // WP Database Queries - Start require_once('wp-includes/wp-db.php') ; $post_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post'" ); echo "\nTotal Blog Posts: {$post_count}"; $post_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'auto-draft'" ); echo "\n Auto-Draft Posts: {$post_count}"; $post_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft'" ); echo "\n Draft Posts: {$post_count}"; $post_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'inherit'" ); echo "\n Inherit Posts: {$post_count}"; $post_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'private'" ); echo "\n Private Posts: {$post_count}"; $post_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'" ); echo "\n Publish Posts: {$post_count}"; $page_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page'" ); echo "\n\nTotal Blog Pages: {$page_count}"; $page_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'auto-draft'" ); echo "\n Auto-Draft Pages: {$page_count}"; $page_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'draft'" ); echo "\n Draft Pages: {$page_count}"; $page_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'inherit'" ); echo "\n Inherit Pages: {$page_count}"; $page_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'private'" ); echo "\n Private Pages: {$page_count}"; $page_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'publish'" ); echo "\n Publish Pages: {$page_count}"; $attachment_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment'" ); echo "\n\nTotal Blog Uploads: {$attachment_count}"; $attachment_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_mime_type like '%image%'" ); echo "\n Image Uploads: {$attachment_count}"; $attachment_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_mime_type like '%audio%'" ); echo "\n Audio Uploads: {$attachment_count}"; $attachment_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND (post_mime_type = 'application/zip' OR post_mime_type = 'application/x-tar' OR post_mime_type = 'application/x-gzip' OR post_mime_type = 'application/rar' OR post_mime_type = 'application/x-7z-compressed')" ); echo "\n Archive Uploads: {$attachment_count}"; $user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users" ); echo "\n\nTotal Users: {$user_count}"; $user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users wpu , $wpdb->usermeta wpum WHERE wpum.user_id = wpu.ID AND meta_value like '%administrator%' AND wpum.meta_key = 'wp_capabilities'" ); echo "\n Administrator Users: {$user_count}"; $user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users wpu , $wpdb->usermeta wpum WHERE wpum.user_id = wpu.ID AND meta_value like '%editor%' AND wpum.meta_key = 'wp_capabilities'" ); echo "\n Editor Users: {$user_count}"; $user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users wpu , $wpdb->usermeta wpum WHERE wpum.user_id = wpu.ID AND meta_value like '%author%' AND wpum.meta_key = 'wp_capabilities'" ); echo "\n Author Users: {$user_count}"; $user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users wpu , $wpdb->usermeta wpum WHERE wpum.user_id = wpu.ID AND meta_value like '%contributor%' AND wpum.meta_key = 'wp_capabilities'" ); echo "\n Contributor Users: {$user_count}"; $user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users wpu , $wpdb->usermeta wpum WHERE wpum.user_id = wpu.ID AND meta_value like '%subscriber%' AND wpum.meta_key = 'wp_capabilities'" ); echo "\n Subscriber Users: {$user_count}\n"; // WP Database Queries - Stop ?>