84% javascript-autoloader

Code Review | Smart JavaScript Auto Loader

WordPress plugin Smart JavaScript Auto Loader scored84%from 54 tests.

About plugin

  • Plugin page: javascript-autolo...
  • Plugin version: 5.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Oct 12, 2023
  • Number of updates: 39
  • Update frequency: every 94.4 days
  • Top authors: petersplugins (61.54%)smartware.cc (41.03%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /18,364 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
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼9.34ms] Passed 4 tests

Analyzing server-side resources used by Smart JavaScript Auto Loader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1443.85 ▲6.84
Dashboard /wp-admin3.54 ▲0.1946.35 ▼12.93
Posts /wp-admin/edit.php3.59 ▲0.2346.86 ▼4.56
Add New Post /wp-admin/post-new.php6.05 ▲0.1679.84 ▼21.08
Media Library /wp-admin/upload.php3.40 ▲0.1635.55 ▲1.22
JS AutoLoader /wp-admin/themes.php?page=jsautoloader3.5130.64

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
javascript_autoloader_data
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Smart JavaScript Auto Loader: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.08 ▼0.181.64 ▲0.1840.67 ▲0.89
Dashboard /wp-admin2,199 ▲225.62 ▲0.0282.96 ▼8.7640.34 ▼3.90
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0733.51 ▼7.9135.98 ▲0.47
Add New Post /wp-admin/post-new.php1,538 ▲1018.19 ▼5.02607.97 ▼60.2071.21 ▲15.29
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.0098.72 ▼8.0543.14 ▼2.79
JS AutoLoader /wp-admin/themes.php?page=jsautoloader8532.2125.9032.34

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • javascript_autoloader_data
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Plugin' not found in wp-content/plugins/javascript-autoloader/inc/ppf/ppf-plugin-addon.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/javascript-autoloader/inc/ppf/ppf-plugin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/javascript-autoloader/inc/ppf/ppf-admin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/javascript-autoloader/inc/ppf/ppf-subclass.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/javascript-autoloader/inc/ppf/ppf-settings.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: wp_enqueue_script, footer, autoload, load, jquery...

javascript-autoloader/sw.cc-js-autoloader.php 85% from 13 tests

The entry point to "Smart JavaScript Auto Loader" version 5.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 200 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("javascript-autoloader.php" instead of "sw.cc-js-autoloader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,092 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP13689997766
CSS1510231
JavaScript2352290
SVG5005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.62
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes675.00%
▷ Concrete classes225.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods7284.71%
▷ Protected methods55.88%
▷ Private methods89.41%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants0
▷ 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
PNG images were not found in this plugin