84% force-jquery-in-head

Code Review | Force jQuery in Head

WordPress plugin Force jQuery in Head scored84%from 54 tests.

About plugin

  • Plugin page: force-jquery-in-head
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: Jun 21, 2023
  • Number of updates: 10
  • Update frequency: every 112.6 days
  • Top authors: jagdishsarma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by Force jQuery in Head
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.0043.05 ▼1.91
Dashboard /wp-admin3.57 ▼0.0652.78 ▼15.27
Posts /wp-admin/edit.php3.68 ▲0.0055.55 ▲1.08
Add New Post /wp-admin/post-new.php6.15 ▲0.00108.14 ▼6.79
Media Library /wp-admin/upload.php3.49 ▲0.0038.47 ▲2.53

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Force jQuery in Head
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲13213.48 ▼0.898.59 ▲6.6239.24 ▼5.72
Dashboard /wp-admin2,195 ▲215.59 ▼0.0098.65 ▲7.0243.12 ▼0.13
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0240.35 ▲1.8735.24 ▲0.53
Add New Post /wp-admin/post-new.php1,545 ▲523.42 ▲0.31644.93 ▲25.0763.64 ▲12.95
Media Library /wp-admin/upload.php1,400 ▲34.20 ▲0.0197.36 ▼13.0344.89 ▼0.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/force-jquery-in-head/main.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: jquery in head, jquery in top head, force jquery in head, jquery in header

force-jquery-in-head/main.php 92% from 13 tests

This is the main PHP file of "Force jQuery in Head" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("force-jquery-in-head.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11105

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin