79% system-snapshot-report

Code Review | System Snapshot Report

WordPress plugin System Snapshot Report scored79%from 54 tests.

About plugin

  • Plugin page: system-snapshot-r...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 6.3.1
  • First release: Aug 19, 2013
  • Latest release: May 1, 2014
  • Number of updates: 12
  • Update frequency: every 21.3 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /7,483 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.02ms] Passed 4 tests

A check of server-side resources used by System Snapshot Report
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.17 ▼5.99
Dashboard /wp-admin3.37 ▲0.0744.88 ▼5.38
Posts /wp-admin/edit.php3.42 ▲0.0747.03 ▲2.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0779.06 ▼9.20
Media Library /wp-admin/upload.php3.30 ▲0.0735.56 ▼19.50
Snapshot /wp-admin/tools.php?page=snapshot-report3.5729.83

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
recovery_mode_email_last_sent
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for System Snapshot Report
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.68 ▼0.701.83 ▼0.4542.67 ▼0.96
Dashboard /wp-admin2,204 ▲195.84 ▲0.94102.55 ▼6.3739.87 ▼3.52
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0739.93 ▲3.3836.33 ▲1.76
Add New Post /wp-admin/post-new.php1,548 ▲1318.22 ▼4.95606.04 ▼83.7455.32 ▼0.13
Media Library /wp-admin/upload.php1,392 ▲134.24 ▼0.0696.85 ▼3.4342.24 ▼0.49
Snapshot /wp-admin/tools.php?page=snapshot-report7071.147.3822.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=snapshot-report
    • > Deprecated in wp-content/plugins/system-snapshot-report/lib/browser.php+152
    Methods with the same name as their class will not be constructors in a future version of PHP; Browser has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=snapshot-report
    • > Error in wp-content/plugins/system-snapshot-report/system-snapshot-report.php+298
    Uncaught Error: Call to undefined function mysql_get_server_info() in wp-content/plugins/system-snapshot-report/system-snapshot-report.php:298
    Stack trace:
    #0 wp-content/plugins/system-snapshot-report/system-snapshot-report.php(177): System_Snapshot_Report->snapshot_data()
    #1 wp-includes/class-wp-hook.php(310): System_Snapshot_Report->snapshot_report()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/tools.php(40): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/system-snapshot-report/system-snapshot-report.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: site audit, system report, server info

system-snapshot-report/system-snapshot-report.php Passed 13 tests

The main PHP file in "System Snapshot Report" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
46 characters long description:
Admin related functions for doing a site audit

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin999 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2140502883
PO File1283179
CSS18232
JavaScript1765

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity84.50
▷ Minimum class complexity51.00
▷ Maximum class complexity118.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods65
▷ Static methods11.54%
▷ Public methods6498.46%
▷ Protected methods00.00%
▷ Private methods11.54%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/img/reaktivlogo@2x.png2.13KB0.85KB▼ 60.07%
lib/img/reaktivlogo.png1.48KB0.48KB▼ 67.89%