74% query-monitor-extension-checking-variables

Code Review | Checking Variables (Dev. Tool)

WordPress plugin Checking Variables (Dev. Tool) scored74%from 54 tests.

About plugin

  • Plugin page: query-monitor-ext...
  • Plugin version: 4.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.4
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Dec 22, 2015
  • Number of updates: 34
  • Update frequency: every 7.4 days
  • Top authors: sujin2f (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,563 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.70MB] [CPU: ▼53.47ms] Passed 4 tests

An overview of server-side resources used by Checking Variables (Dev. Tool)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.168.96 ▼34.21
Dashboard /wp-admin2.33 ▼1.0211.04 ▼50.87
Posts /wp-admin/edit.php2.33 ▼1.0310.86 ▼38.38
Add New Post /wp-admin/post-new.php2.33 ▼3.5710.61 ▼90.41
Media Library /wp-admin/upload.php2.33 ▼0.919.37 ▼24.21
Check Variables /wp-admin/options-general.php?page=check-variables2.339.66

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Checking Variables (Dev. Tool)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.52 ▼0.868.29 ▲6.4944.21 ▼2.26
Dashboard /wp-admin2,200 ▲355.66 ▲0.0782.95 ▼5.7840.04 ▼2.39
Posts /wp-admin/edit.php2,111 ▲112.02 ▲0.0142.25 ▲5.6638.37 ▲0.10
Add New Post /wp-admin/post-new.php1,542 ▲1618.20 ▼5.55661.56 ▲20.3579.40 ▲16.11
Media Library /wp-admin/upload.php1,408 ▲84.39 ▲0.18106.56 ▲2.3945.93 ▼4.31
Check Variables /wp-admin/options-general.php?page=check-variables9191.6925.8025.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/query-monitor-extension-checking-variables/classes/class.io.php+47
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=check-variables
    • > Notice in wp-content/plugins/query-monitor-extension-checking-variables/classes/class.io.php+47
    Trying to access array offset on value of type bool

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: monitor, php, debug, query, develop...

query-monitor-extension-checking-variables/query-monitor-check-var.php 85% from 13 tests

The main PHP script in "Checking Variables (Dev. Tool)" version 4.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("query-monitor-extension-checking-variables.php" instead of "query-monitor-check-var.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin1,194 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8266131995
LESS3261191
CSS101085
JavaScript27523

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity33.67
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods47
▷ Static methods714.89%
▷ Public methods2553.19%
▷ Protected methods00.00%
▷ Private methods2246.81%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin