Plugin Directory

Changeset 1688736


Ignore:
Timestamp:
07/01/2017 01:37:13 PM (9 years ago)
Author:
aaronholbrook
Message:

Preparing for 2.0.0 release

Location:
system-report/trunk
Files:
4 added
9 edited

Legend:

Unmodified
Added
Removed
  • system-report/trunk/readme.txt

    r1680593 r1688736  
    44Requires at least: 3.3
    55Tested up to: 4.8
    6 Stable tag: 1.0.2
     6Stable tag: 2.0.0
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • system-report/trunk/system-report.php

    r1680593 r1688736  
    33 * Plugin Name: System Report
    44 * Description: Quickly identify important aspects of your server, PHP, WordPress installation, theme, plugins and database.
    5  * Version:     1.0.2
     5 * Version:     2.0.0
    66 * Author:      Aaron Holbrook
    77 * Author URI:  http://aaronjholbrook.com
     
    99
    1010/**
    11  * Copyright (c) 2016 Aaron Holbrook (email : [email protected])
     11 * Copyright (c) 2017 Aaron Holbrook (email : [email protected])
    1212 *
    1313 * This program is free software; you can redistribute it and/or modify
     
    4242 * File includes
    4343 */
     44require_once __DIR__ . '/src/class-system-report-table.php';
     45require_once __DIR__ . '/src/get-sys-report-list-table.php';
    4446require_once __DIR__ . '/views/system-report.php';
    4547require_once __DIR__ . '/views/server.php';
     
    5860 * Adds our System Report page to the Tools Menu
    5961 */
    60 add_action( 'admin_menu', function() {
     62add_action( 'admin_menu', function () {
    6163
    6264    add_submenu_page(
     
    7779function system_report_page() {
    7880
    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
    8098}
  • system-report/trunk/views/database.php

    r1680562 r1688736  
    1111    global $wpdb;
    1212
    13     $tables = get_table_count();
    14     $rows = get_row_count();
     13    $tables  = get_table_count();
     14    $rows    = get_row_count();
    1515    $options = get_option_count();
    16     $posts = get_post_count();
     16    $posts   = get_post_count();
    1717
    1818    ob_start();
     
    2222    <p>This shows some basic information about your database.</p>
    2323
    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    ];
    3233
    33     <?php
     34    echo get_sys_report_list_table( $items );
     35
    3436    $output = ob_get_clean();
    3537
  • system-report/trunk/views/php.php

    r1680562 r1688736  
    1616    <p>PHP Configuration and INI settings.</p>
    1717
     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    ];
    1827
    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 );
    2729
    28     <?php
    2930    $output = ob_get_clean();
    3031
  • system-report/trunk/views/plugins.php

    r1680562 r1688736  
    1818    <p>Report of your WordPress installation.</p>
    1919
    20 <pre>
    2120    <?php
     21    $items = [];
    2222    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']
    2726        );
    28     } ?>
    29 </pre>
     27        $items[ $plugin['Title'] ] = $value;
     28    }
    3029
    31     <?php
     30    echo get_sys_report_list_table( $items );
     31
    3232    $output = ob_get_clean();
    3333
  • system-report/trunk/views/server.php

    r1680562 r1688736  
    1313
    1414    <h2 class="title">Server</h2>
     15
    1516    <p>This shows a high level breakdown of what your server looks like.</p>
    1617
    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    ];
    2325
    24     <?php
     26    echo get_sys_report_list_table( $items );
     27
    2528    $output = ob_get_clean();
    2629
  • system-report/trunk/views/system-report.php

    r1680562 r1688736  
    3535
    3636    ob_start();
    37     ?>
    38     <div class="wrap">
    39         <h1>System Report</h1>
    4037
    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();
    4239
    43         <?php echo get_server_report(); ?>
     40    echo get_php_report();
    4441
    45         <?php echo get_php_report(); ?>
     42    echo get_wordpress_report();
    4643
    47         <?php echo get_wordpress_report(); ?>
     44    echo get_theme_report();
    4845
    49         <?php echo get_theme_report(); ?>
     46    echo get_plugins_report();
    5047
    51         <?php echo get_plugins_report(); ?>
     48    echo get_database_report();
    5249
    53         <?php echo get_database_report(); ?>
    54     </div>
    55 
    56     <?php
    5750    $output = ob_get_clean();
    5851
  • system-report/trunk/views/theme.php

    r1680562 r1688736  
    1616    <p>Information on the current active theme.</p>
    1717
    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>
    2618    <?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
    2730    $output = ob_get_clean();
    2831
  • system-report/trunk/views/wordpress.php

    r1680562 r1688736  
    1616    <p>Report of your WordPress installation.</p>
    1717
    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    ];
    2829
    29     <?php
     30    echo get_sys_report_list_table( $items );
     31
    3032    $output = ob_get_clean();
    3133
Note: See TracChangeset for help on using the changeset viewer.