78% wp-enqueue

Code Review | WP Enqueue

WordPress plugin WP Enqueue scored78%from 54 tests.

About plugin

  • Plugin page: wp-enqueue
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Feb 21, 2016
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: boykodev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,129 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
Installer ran successfully

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

An overview of server-side resources used by WP Enqueue
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0235.25 ▼7.92
Dashboard /wp-admin3.32 ▲0.0244.11 ▼5.69
Posts /wp-admin/edit.php3.37 ▲0.0144.93 ▼19.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.75 ▼3.41
Media Library /wp-admin/upload.php3.24 ▲0.0137.95 ▲4.43
WP Enqueue /wp-admin/options-general.php?page=wpenq-menu3.2433.87

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Enqueue
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.431.69 ▼0.1443.43 ▲0.01
Dashboard /wp-admin2,210 ▲215.82 ▼0.09108.79 ▼12.9240.61 ▼6.26
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0638.62 ▼12.2335.22 ▼9.62
Add New Post /wp-admin/post-new.php1,536 ▲823.32 ▲5.11658.79 ▲36.6054.57 ▲0.09
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0193.09 ▼16.4844.88 ▼2.55
WP Enqueue /wp-admin/options-general.php?page=wpenq-menu1,2091.6825.4426.61

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-enqueue/templates/single-wrap.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: cond in wp-content/plugins/wp-enqueue/templates/single-wrap.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_option_name() on null in wp-content/plugins/wp-enqueue/templates/styles.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-enqueue/enqueue.php:196
    • > PHP Notice
      Undefined variable: path_value in wp-content/plugins/wp-enqueue/templates/single-wrap.php on line 12
    • > PHP Notice
      Undefined variable: conditions in wp-content/plugins/wp-enqueue/templates/single-wrap.php on line 19
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/wp-enqueue/templates/single-wrap.php on line 18
    • > PHP Notice
      Undefined variable: path in wp-content/plugins/wp-enqueue/templates/single-wrap.php on line 2
    • > PHP Notice
      Undefined variable: files in wp-content/plugins/wp-enqueue/templates/single-wrap.php on line 5
    • > PHP Notice
      Undefined variable: path_value in wp-content/plugins/wp-enqueue/templates/single-wrap.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_option_name() on null in wp-content/plugins/wp-enqueue/templates/scripts.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: enqueue, styles, scripts, wp_enqueue

wp-enqueue/wp-enqueue.php 92% from 13 tests

The main PHP script in "WP Enqueue" version 1.2.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)

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
Success! There were no dangerous files found in this plugin548 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP99087476
JavaScript28664
CSS2298

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity12.50
▷ Minimum class complexity7.00
▷ Maximum class complexity18.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods850.00%
▷ Public methods1275.00%
▷ Protected methods00.00%
▷ Private methods425.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected