89% bens-version-checker

Code Review | Ben’s Version Checker

WordPress plugin Ben’s Version Checker scored 89% from 54 tests.

About plugin

  • Plugin page: bens-version-checker
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2015
  • Latest release: Jan 29, 2015
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: BenAlderson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 659 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.34ms] Passed 4 tests

An overview of server-side resources used by Ben’s Version Checker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.24 ▼7.64
Dashboard /wp-admin3.32 ▲0.0244.62 ▼5.19
Posts /wp-admin/edit.php3.37 ▲0.0148.71 ▼2.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.70 ▼10.29
Media Library /wp-admin/upload.php3.24 ▲0.0134.44 ▼1.47

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ben’s Version Checker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.69 ▼0.875.18 ▲3.2642.10 ▼2.47
Dashboard /wp-admin2,216 ▲285.83 ▲0.96103.10 ▼5.9036.92 ▼3.29
Posts /wp-admin/edit.php2,108 ▲192.02 ▼0.0438.47 ▼1.4433.75 ▼1.19
Add New Post /wp-admin/post-new.php1,549 ▲723.52 ▲5.01657.38 ▲56.2251.72 ▼0.93
Media Library /wp-admin/upload.php1,407 ▲254.23 ▼0.06100.20 ▲1.5241.91 ▼2.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: 100

bens-version-checker/version-checker.php 85% from 13 tests

The main PHP file in "Ben’s Version Checker" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bens-version-checker.php" instead of "version-checker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin439 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10126391254
JavaScript34429145
CSS112040

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.11
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin