93% custom-javascript-inserter

Code Review | Custom Javascript Inserter

WordPress plugin Custom Javascript Inserter scored 93% from 54 tests.

About plugin

  • Plugin page: custom-javascript...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 5.8.1
  • First release: Jan 15, 2016
  • Latest release: Feb 13, 2016
  • Number of updates: 9
  • Update frequency: every 3.3 days
  • Top authors: r9209 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,028 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼154.09ms] Passed 4 tests

Server-side resources used by Custom Javascript Inserter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0033.35 ▲3.38
Dashboard /wp-admin3.06 ▲0.0142.79 ▼5.69
Posts /wp-admin/edit.php3.12 ▲0.0143.75 ▼2.90
Add New Post /wp-admin/post-new.php4.05 ▼1.3843.09 ▼605.84
Media Library /wp-admin/upload.php3.01 ▼0.0033.12 ▼1.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Custom Javascript Inserter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.39 ▲0.8610.30 ▲0.0946.83 ▼1.21
Dashboard /wp-admin2,970 ▲365.95 ▼0.01137.18 ▼8.96104.18 ▼7.27
Posts /wp-admin/edit.php2,739 ▲32.72 ▼0.0165.89 ▲3.2686.22 ▼11.37
Add New Post /wp-admin/post-new.php1,715 ▲4318.73 ▼0.05372.95 ▲15.07107.56 ▼9.39
Media Library /wp-admin/upload.php1,813 ▲35.03 ▼0.00136.88 ▼8.67124.04 ▲0.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-javascript-inserter/custom-js-inserter.php:12

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === custom-javascript-inserter === )
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

custom-javascript-inserter/custom-js-inserter.php 92% from 13 tests

The main file in "Custom Javascript Inserter" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-javascript-inserter.php" instead of "custom-js-inserter.php")

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
Success! There were no dangerous files found in this plugin60 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG images were found in this plugin