93% enqueue-anything

Code Review | Enqueue Anything

WordPress plugin Enqueue Anything scored 93% from 54 tests.

About plugin

  • Plugin page: enqueue-anything
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 5.9.2
  • First release: Feb 26, 2021
  • Latest release: Feb 9, 2022
  • Number of updates: 9
  • Update frequency: every 38.7 days
  • Top authors: Terrence LP (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 200 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼296.42ms] Passed 4 tests

A check of server-side resources used by Enqueue Anything
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0952.56 ▲5.03
Dashboard /wp-admin3.48 ▲0.0733.16 ▲0.79
Posts /wp-admin/edit.php3.71 ▲0.0640.28 ▲2.04
Add New Post /wp-admin/post-new.php7.02 ▲0.0592.98 ▼1,189.30
Media Library /wp-admin/upload.php3.36 ▲0.0626.35 ▲0.78

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Enqueue Anything
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,796 ▲5215.65 ▼0.056.07 ▲0.272.62 ▼0.26
Dashboard /wp-admin2,889 ▲356.12 ▼0.09119.49 ▼17.19157.52 ▲0.88
Posts /wp-admin/edit.php2,706 ▲183.24 ▲0.0064.95 ▲0.19141.99 ▼4.80
Add New Post /wp-admin/post-new.php1,678 ▼1218.39 ▼2.29409.06 ▼30.52155.96 ▼2.33
Media Library /wp-admin/upload.php1,713 ▲155.52 ▲0.02142.57 ▼11.98191.24 ▼9.40

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 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/enqueue-anything/partials/saved-table-page.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/enqueue-anything/enqueue-any-settings.php:105
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/enqueue-anything/enqueue-any-settings.php:105

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === enqueue-anything === )
The official readme.txt is a good inspiration

enqueue-anything/enqueue-any.php 85% from 13 tests

This is the main PHP file of "Enqueue Anything" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("enqueue-anything.php" instead of "enqueue-any.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 plugin411 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33824277
CSS218186
JavaScript27048

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin