88% easy-custom-js-and-css

Code Review | WordPress Easy Custom Js And Css Plugin

WordPress plugin WordPress Easy Custom Js And Css Plugin scored 88% from 54 tests.

About plugin

  • Plugin page: easy-custom-js-an...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.1
  • WordPress version: 5.8.1
  • First release: May 18, 2018
  • Latest release: Feb 24, 2021
  • Number of updates: 34
  • Update frequency: every 29.8 days
  • Top authors: avirtum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 2,082 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼147.09ms] Passed 4 tests

An overview of server-side resources used by WordPress Easy Custom Js And Css Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.13 ▲0.4143.43 ▲19.10
Dashboard /wp-admin3.44 ▲0.3851.23 ▼1.53
Posts /wp-admin/edit.php3.49 ▲0.3842.89 ▼2.96
Add New Post /wp-admin/post-new.php5.73 ▲0.3093.21 ▼586.16
Media Library /wp-admin/upload.php3.32 ▲0.3236.83 ▲2.30
All filters /wp-admin/admin.php?page=easy_custom_js_and_css_filters3.3233.40
All Items /wp-admin/admin.php?page=easy_custom_js_and_css3.3333.17
Settings /wp-admin/admin.php?page=easy_custom_js_and_css_settings3.2933.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 462 new files
Database: 2 new tables, no new options
New tables
wp_easy_custom_js_and_css
wp_easy_custom_js_and_css_filters

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Easy Custom Js And Css Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,718 ▲12215.75 ▲0.158.25 ▼0.4951.60 ▲0.68
Dashboard /wp-admin3,012 ▲815.89 ▼0.04145.25 ▼13.18113.94 ▼7.11
Posts /wp-admin/edit.php2,778 ▲392.70 ▲0.0269.96 ▼3.4699.65 ▲3.48
Add New Post /wp-admin/post-new.php1,708 ▲2518.47 ▼0.28377.72 ▼19.96108.49 ▼9.80
Media Library /wp-admin/upload.php1,790 ▼175.00 ▼0.03157.72 ▲1.23126.46 ▼0.85
All filters /wp-admin/admin.php?page=easy_custom_js_and_css_filters1,6222.5363.2990.42
All Items /wp-admin/admin.php?page=easy_custom_js_and_css1,6863.0681.0084.32
Settings /wp-admin/admin.php?page=easy_custom_js_and_css_settings2,3502.8178.76100.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/scssphp/src/Formatter/Compact.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/minify/src/JS.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/minify/src/Converter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/minify/src/Exceptions/BasicException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\ode' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/scssphp/src/Node/Number.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/minify/src/Exceptions/IOException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/minify/src/CSS.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/scssphp/src/Formatter/Nested.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/scssphp/src/Formatter/Debug.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/easy-custom-js-and-css/includes/lib/minify/src/Exceptions/FileImportException.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=easy_custom_js_and_css
    • > Console-api (severe) in wp-content/plugins/easy-custom-js-and-css/assets/js/lib/ace/ace.js?ver=1.1.2+0:483
    dropping module because define wasn't a string.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: custom css, development, less scss preprocessors, custom js, custom codes

easy-custom-js-and-css/easy-custom-js-and-css.php 85% from 13 tests

The entry point to "WordPress Easy Custom Js And Css Plugin" version 1.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: The description should be shorter than 140 characters (currently 238 characters long)

Code Analysis 97% from 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
There were no executable files found in this plugin16,212 lines of code in 448 files:
LanguageFilesBlank linesComment linesLines of code
PHP523,3685,52413,158
JavaScript39238112,686
PO File1120143288
SVG10078
CSS2062

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity53.29
▷ Minimum class complexity1.00
▷ Maximum class complexity709.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces10
Interfaces1
Traits0
Classes50
▷ Abstract classes510.00%
▷ Concrete classes4590.00%
▷ Final classes00.00%
Methods761
▷ Static methods202.63%
▷ Public methods28937.98%
▷ Protected methods45459.66%
▷ Private methods182.37%
Functions23
▷ Named functions417.39%
▷ Anonymous functions1982.61%
Constants138
▷ Global constants64.35%
▷ Class constants13295.65%
▷ Public constants132100.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 images were found in this plugin