84% wp-deferred-javascripts

Code Review | WP Deferred JavaScripts

WordPress plugin WP Deferred JavaScripts scored84%from 54 tests.

About plugin

  • Plugin page: wp-deferred-javas...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Jan 27, 2013
  • Latest release: Sep 1, 2016
  • Number of updates: 61
  • Update frequency: every 35.1 days
  • Top authors: willybahuaud (81.97%)Confridin (19.67%)

Code review

54 tests

User reviews

35 reviews

Install metrics

1,000+ active /157,141 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.11ms] Passed 4 tests

An overview of server-side resources used by WP Deferred JavaScripts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0436.99 ▼5.71
Dashboard /wp-admin3.33 ▲0.0349.08 ▼3.37
Posts /wp-admin/edit.php3.38 ▲0.0250.67 ▼3.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.16 ▲3.90
Media Library /wp-admin/upload.php3.25 ▲0.0238.79 ▲6.95
WP Deferred Javascripts /wp-admin/options-general.php?page=wp-deferred-javascripts3.2233.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Deferred JavaScripts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,687 ▼997.60 ▼6.334.72 ▲2.6942.82 ▼1.62
Dashboard /wp-admin2,202 ▲225.65 ▲0.0193.64 ▲5.3044.84 ▲3.98
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0240.35 ▼4.2234.90 ▼4.42
Add New Post /wp-admin/post-new.php1,548 ▲823.11 ▲4.85638.98 ▲27.3754.95 ▲5.43
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.04100.52 ▼11.2142.04 ▼6.39
WP Deferred Javascripts /wp-admin/options-general.php?page=wp-deferred-javascripts8062.0225.9230.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-deferred-javascripts/wp-deferred-javascripts.php
    • > /wp-content/plugins/wp-deferred-javascripts/inc/frontend.php
    • > /wp-content/plugins/wp-deferred-javascripts/inc/admin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: labjs, optimization, deferring, speed, asynchronous...

wp-deferred-javascripts/wp-deferred-javascripts.php Passed 13 tests

The principal PHP file in "WP Deferred JavaScripts" v. 2.0.5 is loaded by WordPress automatically on each request
102 characters long description:
This plugin defer the loading of all javascripts added by the way of wp_enqueue_script(), using LABJS.

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
Good job! No executable or dangerous file extensions detected335 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP310861298
PO File15736
JavaScript1011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected