79% site-speed-monitor

Code Review | Site Speed Monitor

WordPress plugin Site Speed Monitor scored79%from 54 tests.

About plugin

  • Plugin page: site-speed-monitor
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Aug 28, 2017
  • Latest release: Feb 11, 2018
  • Number of updates: 5
  • Update frequency: every 33.4 days
  • Top authors: eherman24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,179 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.88MB] [CPU: ▲4.01ms] Passed 4 tests

Server-side resources used by Site Speed Monitor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9148.06 ▲3.14
Dashboard /wp-admin4.22 ▲0.9258.18 ▲4.62
Posts /wp-admin/edit.php4.27 ▲0.9153.36 ▲4.67
Add New Post /wp-admin/post-new.php6.74 ▲0.85102.25 ▲3.62
Media Library /wp-admin/upload.php4.08 ▲0.8547.09 ▲12.15
Site Speed Monitor /wp-admin/tools.php?page=site-speed-monitor-tools4.0440.45
Site Speed Monitor /wp-admin/options-general.php?page=site-speed-monitor4.0547.06

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Site Speed Monitor: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8314.65 ▲0.251.77 ▼0.1643.18 ▼1.51
Dashboard /wp-admin2,238 ▲645.62 ▲0.1099.05 ▼2.3942.38 ▼3.97
Posts /wp-admin/edit.php2,114 ▲142.04 ▲0.0136.32 ▼1.3638.18 ▲2.44
Add New Post /wp-admin/post-new.php1,538 ▲1023.18 ▲0.18657.27 ▼8.8059.72 ▲6.99
Media Library /wp-admin/upload.php1,408 ▲84.18 ▼0.04108.70 ▼1.2943.81 ▼4.05
Site Speed Monitor /wp-admin/tools.php?page=site-speed-monitor-tools7742.0025.6823.31
Site Speed Monitor /wp-admin/options-general.php?page=site-speed-monitor1,0331.8731.0642.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/site-speed-monitor/includes/documentation/hook-docs.php
    • > /wp-content/plugins/site-speed-monitor/includes/documentation/term-docs.php
    • > /wp-content/plugins/site-speed-monitor/includes/documentation/faq-docs.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/site-speed-monitor/site-speed-monitor.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: monitor, report, graph, tester, speed...

site-speed-monitor/site-speed-monitor.php Passed 13 tests

The main PHP file in "Site Speed Monitor" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
95 characters long description:
Site Speed Monitor allows you to monitor your website load times using the WebPageTest.org API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected20,495 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript123,0092,26414,520
PHP232,1091,5463,716
CSS224242422,259

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity28.61
▷ Minimum class complexity2.00
▷ Maximum class complexity132.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes17100.00%
Methods142
▷ Static methods4229.58%
▷ Public methods13997.89%
▷ Protected methods00.00%
▷ Private methods32.11%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.08MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/header-pattern.png20.72KB20.26KB▼ 2.18%
assets/images/developer-header-parrot.png5.49KB5.48KB0.25%
assets/images/site-speed-monitor-text-white.png3.67KB3.38KB▼ 7.86%
assets/images/code-parrots-logo-dark.png9.14KB7.06KB▼ 22.73%
assets/images/header-parrot.png44.14KB18.63KB▼ 57.78%