90% version-control-for-jquery

Code Review | Version Control for jQuery

WordPress plugin Version Control for jQuery scored90%from 54 tests.

About plugin

  • Plugin page: version-control-f...
  • Plugin version: 3.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Aug 31, 2023
  • Number of updates: 60
  • Update frequency: every 42.2 days
  • Top authors: leanderiversen (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /53,266 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.92ms] Passed 4 tests

Analyzing server-side resources used by Version Control for jQuery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1345.41 ▲1.01
Dashboard /wp-admin3.44 ▲0.1453.82 ▼3.70
Posts /wp-admin/edit.php3.56 ▲0.2051.06 ▼1.18
Add New Post /wp-admin/post-new.php6.03 ▲0.1391.42 ▼22.00
Media Library /wp-admin/upload.php3.37 ▲0.1335.27 ▼0.81
jQuery Version Control /wp-admin/options-general.php?page=version_control_for_jquery3.3338.16

Server storage [IO: ▲0.08MB] [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: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Version Control for jQuery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.60 ▼0.7513.31 ▲11.4042.93 ▼2.64
Dashboard /wp-admin2,202 ▲285.61 ▲0.0592.91 ▲0.1342.28 ▲0.56
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0834.70 ▼4.4433.79 ▼0.68
Add New Post /wp-admin/post-new.php1,531 ▲522.97 ▼0.08703.10 ▲11.4257.67 ▲4.17
Media Library /wp-admin/upload.php1,404 ▲14.11 ▼0.15103.46 ▼13.9243.66 ▼7.71
jQuery Version Control /wp-admin/options-general.php?page=version_control_for_jquery1,2491.9923.1229.08

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
8 plugin tags: jquery, version, core, javascript, update...

version-control-for-jquery/init.php 92% from 13 tests

The main file in "Version Control for jQuery" v. 3.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("version-control-for-jquery.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected980 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP79721702
PO File56672278

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods523.81%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected