84% additional-js

Code Review | Additional JS

WordPress plugin Additional JS scored 84% from 54 tests.

About plugin

  • Plugin page: additional-js
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2.2
  • WordPress version: 5.9.2
  • First release: Jan 25, 2019
  • Latest release: Sep 2, 2019
  • Number of updates: 10
  • Update frequency: every 22.1 days
  • Top authors: modularwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 756 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Additional JS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0258.41 ▲8.25
Dashboard /wp-admin3.42 ▲0.0132.48 ▲0.28
Posts /wp-admin/edit.php3.65 ▲0.0137.98 ▲1.31
Add New Post /wp-admin/post-new.php6.89 ▼0.0893.02 ▼1,185.74
Media Library /wp-admin/upload.php3.30 ▲0.0127.91 ▲3.16
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php6.2055.64

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 2 new options
New WordPress options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Additional JS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲4915.84 ▲0.196.17 ▲0.072.38 ▼0.73
Dashboard /wp-admin2,894 ▲336.02 ▼0.27119.71 ▼13.03161.01 ▼0.61
Posts /wp-admin/edit.php2,693 ▲53.24 ▲0.0066.19 ▲2.79145.15 ▼2.54
Add New Post /wp-admin/post-new.php1,714 ▲320.65 ▼0.67428.26 ▼33.02154.59 ▼1.50
Media Library /wp-admin/upload.php1,703 ▲55.51 ▼0.01136.68 ▼17.88186.48 ▼2.15
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,26519.79498.96160.24

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 options in the database
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === additional-js === )
You can take inspiration from this readme.txt

additional-js/additional-js.php 92% from 13 tests

This is the main PHP file of "Additional JS" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin37 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP173134
CSS1003

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.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%
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