84% switch-jq-version

Code Review | Switch jQuery Version

WordPress plugin Switch jQuery Version scored84%from 54 tests.

About plugin

  • Plugin page: switch-jq-version
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Jan 30, 2014
  • Latest release: Mar 18, 2014
  • Number of updates: 28
  • Update frequency: every 1.7 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,015 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Switch jQuery Version
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0337.31 ▼3.80
Dashboard /wp-admin3.37 ▼0.0146.98 ▼19.02
Posts /wp-admin/edit.php3.42 ▲0.0348.77 ▲3.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0380.91 ▼33.43
Media Library /wp-admin/upload.php3.29 ▲0.0335.57 ▼2.89
Switch jQuery Version /wp-admin/options-general.php?page=switch-jq-version-options3.2630.31

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: no files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_recent-posts
switch_jq_version_customise_url
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
switch_jq_version_version
switch_jq_version_cdn

Browser metrics Passed 4 tests

An overview of browser requirements for Switch jQuery Version
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.76 ▼0.4811.38 ▲9.6838.06 ▼5.60
Dashboard /wp-admin2,207 ▲225.84 ▼0.04104.19 ▼3.3238.45 ▼1.79
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0133.61 ▼6.8938.23 ▲3.23
Add New Post /wp-admin/post-new.php1,536 ▲323.21 ▲0.11688.31 ▲7.9556.00 ▲2.43
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.1496.48 ▼16.6541.12 ▼7.02
Switch jQuery Version /wp-admin/options-general.php?page=switch-jq-version-options8762.0224.8230.54

Uninstaller [IO: ✅] [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
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • switch_jq_version_customise_url
    • widget_recent-posts
    • switch_jq_version_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • switch_jq_version_cdn

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/switch-jq-version/options.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/switch-jq-version/switch-jq-version.php:34

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: jquery cdn, jquery, blog, jquery version

switch-jq-version/switch-jq-version.php Passed 13 tests

The principal PHP file in "Switch jQuery Version" v. 1.2.2 is loaded by WordPress automatically on each request
65 characters long description:
Change your jQuery version and the CDN of jQuery just by onclick!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected226 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21625122
PO File23334104

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin