84% rest-query-monitor

Code Review | REST Query Monitor

WordPress plugin REST Query Monitor scored84%from 54 tests.

About plugin

  • Plugin page: rest-query-monitor
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2020
  • Latest release: Nov 19, 2020
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: perryrylance (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.82ms] Passed 4 tests

An overview of server-side resources used by REST Query Monitor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.46 ▼2.83
Dashboard /wp-admin3.32 ▼0.0246.48 ▼14.86
Posts /wp-admin/edit.php3.37 ▲0.0241.83 ▼3.51
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.00 ▼14.08
Media Library /wp-admin/upload.php3.25 ▲0.0234.34 ▲1.87

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for REST Query Monitor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.351.92 ▼0.0146.19 ▲3.34
Dashboard /wp-admin2,203 ▲155.79 ▲0.9298.78 ▼14.1241.72 ▼1.27
Posts /wp-admin/edit.php2,089 ▲32.04 ▼0.0142.59 ▲4.6234.33 ▲1.49
Add New Post /wp-admin/post-new.php1,537 ▲1823.27 ▲0.05616.59 ▼33.7250.19 ▼19.18
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0195.31 ▼1.0742.93 ▼3.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PerryRylance\\WordPress\\RestQueryMonitor\\add_action() in wp-content/plugins/rest-query-monitor/includes/class.monitor.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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: rest query, query monitor, rest query monitor

rest-query-monitor/rest-query-monitor.php Passed 13 tests

This is the main PHP file of "REST Query Monitor" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
95 characters long description:
This plugin will add dumps of SQL queries to REST response headers, for debugging REST systems.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin128 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP53317117
Markdown1307
JavaScript1104

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.33
▷ Minimum class complexity3.00
▷ Maximum class complexity4.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin