Changeset 1688736
- Timestamp:
- 07/01/2017 01:37:13 PM (9 years ago)
- Location:
- system-report/trunk
- Files:
-
- 4 added
- 9 edited
-
composer.json (added)
-
readme.txt (modified) (1 diff)
-
src (added)
-
src/class-system-report-table.php (added)
-
src/get-sys-report-list-table.php (added)
-
system-report.php (modified) (5 diffs)
-
views/database.php (modified) (2 diffs)
-
views/php.php (modified) (1 diff)
-
views/plugins.php (modified) (1 diff)
-
views/server.php (modified) (1 diff)
-
views/system-report.php (modified) (1 diff)
-
views/theme.php (modified) (1 diff)
-
views/wordpress.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
system-report/trunk/readme.txt
r1680593 r1688736 4 4 Requires at least: 3.3 5 5 Tested up to: 4.8 6 Stable tag: 1.0.26 Stable tag: 2.0.0 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
system-report/trunk/system-report.php
r1680593 r1688736 3 3 * Plugin Name: System Report 4 4 * Description: Quickly identify important aspects of your server, PHP, WordPress installation, theme, plugins and database. 5 * Version: 1.0.25 * Version: 2.0.0 6 6 * Author: Aaron Holbrook 7 7 * Author URI: http://aaronjholbrook.com … … 9 9 10 10 /** 11 * Copyright (c) 201 6 Aaron Holbrook (email : [email protected])11 * Copyright (c) 2017 Aaron Holbrook (email : [email protected]) 12 12 * 13 13 * This program is free software; you can redistribute it and/or modify … … 42 42 * File includes 43 43 */ 44 require_once __DIR__ . '/src/class-system-report-table.php'; 45 require_once __DIR__ . '/src/get-sys-report-list-table.php'; 44 46 require_once __DIR__ . '/views/system-report.php'; 45 47 require_once __DIR__ . '/views/server.php'; … … 58 60 * Adds our System Report page to the Tools Menu 59 61 */ 60 add_action( 'admin_menu', function () {62 add_action( 'admin_menu', function () { 61 63 62 64 add_submenu_page( … … 77 79 function system_report_page() { 78 80 79 echo get_system_report_page(); 81 ?> 82 <div class="wrap"> 83 <style> 84 table.wp-list-table #setting { 85 width: 30%; 86 } 87 </style> 88 <h1>System Report</h1> 89 90 <p> 91 This system report stands to assist you in quickly identifying all aspects of your WordPress, plugin, server and database information at a glance. 92 </p> 93 <?php 94 echo get_system_report_page(); 95 ?> 96 </div> 97 <?php 80 98 } -
system-report/trunk/views/database.php
r1680562 r1688736 11 11 global $wpdb; 12 12 13 $tables = get_table_count();14 $rows = get_row_count();13 $tables = get_table_count(); 14 $rows = get_row_count(); 15 15 $options = get_option_count(); 16 $posts = get_post_count();16 $posts = get_post_count(); 17 17 18 18 ob_start(); … … 22 22 <p>This shows some basic information about your database.</p> 23 23 24 <pre> 25 <?php echo esc_html( str_pad( 'Version:', 20 ) ); ?> <code><?php echo esc_html( $wpdb->db_version() ); ?></code> 26 <?php echo esc_html( str_pad( 'Base Prefix:', 20 ) ); ?> <code><?php echo esc_html( $wpdb->base_prefix ); ?></code> 27 <?php echo esc_html( str_pad( 'Table Count:', 20 ) ); ?> <code><?php echo esc_html( $tables ); ?></code> 28 <?php echo esc_html( str_pad( 'Row Count:', 20 ) ); ?> <code><?php echo esc_html( $rows ); ?>k</code> 29 <?php echo esc_html( str_pad( 'Option Count:', 20 ) ); ?> <code><?php echo esc_html( $options ); ?></code> 30 <?php echo esc_html( str_pad( 'Post Count:', 20 ) ); ?> <code><?php echo esc_html( $posts ); ?></code> 31 </pre> 24 <?php 25 $items = [ 26 'Version' => $wpdb->db_version(), 27 'Base Prefix' => $wpdb->base_prefix, 28 'Table Count' => $tables, 29 'Row Count' => $rows . 'k', 30 'Option Count' => $options, 31 'Post Count' => $posts, 32 ]; 32 33 33 <?php 34 echo get_sys_report_list_table( $items ); 35 34 36 $output = ob_get_clean(); 35 37 -
system-report/trunk/views/php.php
r1680562 r1688736 16 16 <p>PHP Configuration and INI settings.</p> 17 17 18 <?php 19 $items = [ 20 'Version' => phpversion(), 21 'Display Errors' => ini_get( 'display_errors' ) ? 'true' : 'false', 22 'POST Max Size' => ini_get( 'post_max_size' ), 23 'Error Log' => ini_get( 'error_log' ), 24 'Max Execution Time' => ini_get( 'max_execution_time' ), 25 'Memory Limit' => ini_get( 'memory_limit' ), 26 ]; 18 27 19 <pre> 20 <?php echo esc_html( str_pad( 'Version:', 20 ) ); ?> <code><?php echo esc_html( phpversion() ); ?></code> 21 <?php echo esc_html( str_pad( 'Display Errors:', 20 ) ); ?> <code><?php echo esc_html( ini_get( 'display_errors' ) ? 'true' : 'false' ) ; ?></code> 22 <?php echo esc_html( str_pad( 'POST Max Size:', 20 ) ); ?> <code><?php echo esc_html( ini_get( 'post_max_size' ) ); ?></code> 23 <?php echo esc_html( str_pad( 'Error Log:', 20 ) ); ?> <code><?php echo esc_html( ini_get( 'error_log' ) ); ?></code> 24 <?php echo esc_html( str_pad( 'Max Execution Time:', 20 ) ); ?> <code><?php echo esc_html( ini_get( 'max_execution_time' ) ); ?></code> 25 <?php echo esc_html( str_pad( 'Memory Limit:', 20 ) ); ?> <code><?php echo esc_html( ini_get( 'memory_limit' ) ); ?></code> 26 </pre> 28 echo get_sys_report_list_table( $items ); 27 29 28 <?php29 30 $output = ob_get_clean(); 30 31 -
system-report/trunk/views/plugins.php
r1680562 r1688736 18 18 <p>Report of your WordPress installation.</p> 19 19 20 <pre>21 20 <?php 21 $items = []; 22 22 foreach ( $plugins as $plugin_file => $plugin ) { 23 printf( "%s <code>%s</code> <code>%s</code>\r\n\t", 24 str_pad( esc_html( $plugin['Title'] ), 35 ), 25 str_pad( is_plugin_active( $plugin_file ) ? 'Active' : 'Inactive', 8 ), 26 esc_html( $plugin['Version'] ) 23 $value = sprintf( "[%s] - %s", 24 is_plugin_active( $plugin_file ) ? 'Active' : 'Inactive', 25 $plugin['Version'] 27 26 ); 28 } ?>29 </pre> 27 $items[ $plugin['Title'] ] = $value; 28 } 30 29 31 <?php 30 echo get_sys_report_list_table( $items ); 31 32 32 $output = ob_get_clean(); 33 33 -
system-report/trunk/views/server.php
r1680562 r1688736 13 13 14 14 <h2 class="title">Server</h2> 15 15 16 <p>This shows a high level breakdown of what your server looks like.</p> 16 17 17 <pre> 18 <?php echo esc_html( str_pad( 'Software:', 20 ) ); ?> <code><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></code> 19 <?php echo esc_html( str_pad( 'Name:', 20 ) ); ?> <code><?php echo esc_html( $_SERVER['SERVER_NAME'] ); ?></code> 20 <?php echo esc_html( str_pad( 'Address:', 20 ) ); ?> <code><?php echo esc_html( $_SERVER['SERVER_ADDR'] ); ?></code> 21 <?php echo esc_html( str_pad( 'Port:', 20 ) ); ?> <code><?php echo esc_html( $_SERVER['SERVER_PORT'] ); ?></code> 22 </pre> 18 <?php 19 $items = [ 20 'Software' => $_SERVER['SERVER_SOFTWARE'], 21 'Name' => $_SERVER['SERVER_NAME'], 22 'Address' => $_SERVER['SERVER_ADDR'], 23 'Port' => $_SERVER['SERVER_PORT'], 24 ]; 23 25 24 <?php 26 echo get_sys_report_list_table( $items ); 27 25 28 $output = ob_get_clean(); 26 29 -
system-report/trunk/views/system-report.php
r1680562 r1688736 35 35 36 36 ob_start(); 37 ?>38 <div class="wrap">39 <h1>System Report</h1>40 37 41 <p>This system report stands to assist you in quickly identifying all aspects of your WordPress, plugin, server and database information at a glance.</p>38 echo get_server_report(); 42 39 43 <?php echo get_server_report(); ?>40 echo get_php_report(); 44 41 45 <?php echo get_php_report(); ?>42 echo get_wordpress_report(); 46 43 47 <?php echo get_wordpress_report(); ?>44 echo get_theme_report(); 48 45 49 <?php echo get_theme_report(); ?>46 echo get_plugins_report(); 50 47 51 <?php echo get_plugins_report(); ?>48 echo get_database_report(); 52 49 53 <?php echo get_database_report(); ?>54 </div>55 56 <?php57 50 $output = ob_get_clean(); 58 51 -
system-report/trunk/views/theme.php
r1680562 r1688736 16 16 <p>Information on the current active theme.</p> 17 17 18 <pre>19 <?php echo esc_html( str_pad( 'Name:', 20 ) ); ?> <code><?php echo esc_html( $theme->get( 'Name' ) ); ?></code>20 <?php echo esc_html( str_pad( 'Author:', 20 ) ); ?> <code><?php echo esc_html( $theme->get( 'Author' ) ); ?></code>21 <?php echo esc_html( str_pad( 'Author URI:', 20 ) ); ?> <code><?php echo esc_html( $theme->get( 'AuthorURI' ) ); ?></code>22 <?php echo esc_html( str_pad( 'Version:', 20 ) ); ?> <code><?php echo esc_html( $theme->get( 'Version' ) ); ?></code>23 <?php echo esc_html( str_pad( 'Theme Root:', 20 ) ); ?> <code><?php echo esc_html( $theme->theme_root ); ?></code>24 <?php echo esc_html( str_pad( 'Template:', 20 ) ); ?> <code><?php echo esc_html( $theme->get( 'Template' ) ); ?></code>25 </pre>26 18 <?php 19 $items = [ 20 'Name' => $theme->get( 'Name' ), 21 'Author' => $theme->get( 'Author' ), 22 'Author URI' => $theme->get( 'AuthorURI' ), 23 'Version' => $theme->get( 'Version' ), 24 'Theme Root' => $theme->theme_root, 25 'Template' => $theme->get( 'Template' ), 26 ]; 27 28 echo get_sys_report_list_table( $items ); 29 27 30 $output = ob_get_clean(); 28 31 -
system-report/trunk/views/wordpress.php
r1680562 r1688736 16 16 <p>Report of your WordPress installation.</p> 17 17 18 <pre> 19 <?php echo esc_html( str_pad( 'Version:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'version' ) ); ?></code> 20 <?php echo esc_html( str_pad( 'Admin Email:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'admin_email' ) ); ?></code> 21 <?php echo esc_html( str_pad( 'Language:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'language' ) ); ?></code> 22 <?php echo esc_html( str_pad( 'Stylesheet Dir:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'stylesheet_directory' ) ); ?></code> 23 <?php echo esc_html( str_pad( 'Template Dir:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'template_directory' ) ); ?></code> 24 <?php echo esc_html( str_pad( 'Charset:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'charset' ) ); ?></code> 25 <?php echo esc_html( str_pad( 'URL:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'url' ) ); ?></code> 26 <?php echo esc_html( str_pad( 'WP URL:', 20 ) ); ?> <code><?php echo esc_html( get_bloginfo( 'wpurl' ) ); ?></code> 27 </pre> 18 <?php 19 $items = [ 20 'Version' => get_bloginfo( 'version' ), 21 'Admin Email' => get_bloginfo( 'admin_email' ), 22 'Language' => get_bloginfo( 'language' ), 23 'Stylesheet Dir' => get_bloginfo( 'stylesheet_directory' ), 24 'Template Dir' => get_bloginfo( 'template_directory' ), 25 'Charset' => get_bloginfo( 'charset' ), 26 'URL' => get_bloginfo( 'url' ), 27 'WP URL' => get_bloginfo( 'wpurl' ), 28 ]; 28 29 29 <?php 30 echo get_sys_report_list_table( $items ); 31 30 32 $output = ob_get_clean(); 31 33
Note: See TracChangeset
for help on using the changeset viewer.