84% css-and-js-enqueuer

Code Review | CSS and JS Enqueuer

WordPress plugin CSS and JS Enqueuer scored84%from 54 tests.

About plugin

  • Plugin page: css-and-js-enqueuer
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 23, 2014
  • Latest release: Jul 31, 2019
  • Number of updates: 8
  • Update frequency: every 221.5 days
  • Top authors: hiratatsuya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,633 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.27ms] Passed 4 tests

This is a short check of server-side resources used by CSS and JS Enqueuer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.14 ▼0.13
Dashboard /wp-admin3.38 ▲0.0854.26 ▲3.27
Posts /wp-admin/edit.php3.49 ▲0.1451.51 ▲0.30
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.36 ▼5.43
Media Library /wp-admin/upload.php3.30 ▲0.0736.94 ▲0.20
Enqueue CSS, JS /wp-admin/themes.php?page=css_and_js_enqueuer_options3.2731.46

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for CSS and JS Enqueuer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.38 ▼0.252.28 ▲0.3045.32 ▲1.54
Dashboard /wp-admin2,199 ▲255.61 ▼0.0491.27 ▼8.9542.98 ▲0.43
Posts /wp-admin/edit.php2,101 ▲12.09 ▲0.0635.50 ▼1.2734.70 ▲0.01
Add New Post /wp-admin/post-new.php1,534 ▲322.92 ▼0.50686.55 ▼12.4359.43 ▼2.87
Media Library /wp-admin/upload.php1,404 ▲74.25 ▼0.0093.66 ▼30.1142.89 ▼5.03
Enqueue CSS, JS /wp-admin/themes.php?page=css_and_js_enqueuer_options1,1112.6047.9444.36

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/css-and-js-enqueuer/css-and-js-enqueuer.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: js, css, visual editor

css-and-js-enqueuer/css-and-js-enqueuer.php Passed 13 tests

Analyzing the main PHP file in "CSS and JS Enqueuer" version 0.2.1
84 characters long description:
CSS and JS Enqueuer plugin will enable to enqueue external CSS and JS, and edit it.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin327 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24011261
PO File1192451
JavaScript16515

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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