62% css-js-manager

Code Review | CSS JS Manager, Async JavaScript, Defer Render Blocking CSS supports WooCommerce

WordPress plugin CSS JS Manager, Async JavaScript, Defer Render Blocking CSS supports WooCommerce scored62%from 54 tests.

About plugin

  • Plugin page: css-js-manager
  • Plugin version: 2.4.49.20
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: Jan 31, 2019
  • Latest release: Nov 19, 2023
  • Number of updates: 125
  • Update frequency: every 14.0 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

80 reviews

Install metrics

3,000+ active /119,259 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▲2.62ms] Passed 4 tests

This is a short check of server-side resources used by CSS JS Manager, Async JavaScript, Defer Render Blocking CSS supports WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4341.13 ▼0.41
Dashboard /wp-admin3.69 ▲0.3849.10 ▲3.35
Posts /wp-admin/edit.php3.74 ▲0.3848.68 ▲5.75
Add New Post /wp-admin/post-new.php6.21 ▲0.3393.31 ▲6.41
Media Library /wp-admin/upload.php3.55 ▲0.3233.67 ▲1.80
Add New /wp-admin/post-new.php?post_type=pi_critical_css3.6341.35
Critical CSS /wp-admin/edit.php?post_type=pi_critical_css3.6536.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: 1 new table, 7 new options
New tables
wp_css_js_manager
New WordPress options
pi_review_activation_date_css-js-manager
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for CSS JS Manager, Async JavaScript, Defer Render Blocking CSS supports WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14514.25 ▲0.011.71 ▼0.0136.93 ▼10.54
Dashboard /wp-admin2,290 ▲1095.52 ▼0.1592.28 ▼14.9380.24 ▲35.81
Posts /wp-admin/edit.php2,216 ▲1131.99 ▲0.0140.35 ▲2.8434.34 ▼1.78
Add New Post /wp-admin/post-new.php6,325 ▲4,78926.12 ▲2.89994.37 ▲356.0551.16 ▼3.32
Media Library /wp-admin/upload.php1,510 ▲1104.17 ▼0.0992.90 ▼6.7064.34 ▲20.66
Add New /wp-admin/post-new.php?post_type=pi_critical_css1,5812.4953.8860.58
Critical CSS /wp-admin/edit.php?post_type=pi_critical_css1,1781.9030.5628.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_css_js_manager
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • pi_review_activation_date_css-js-manager
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=pi_critical_css
    • > Notice in wp-content/plugins/css-js-manager/admin/critical-css-type.php+144
    Undefined variable: global_css

SRP 0% 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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/css-js-manager/admin/partials/css-js-manager-admin-display.php
    • > /wp-content/plugins/css-js-manager/public/partials/css-js-manager-public-display.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Super_Rule' not found in wp-content/plugins/css-js-manager/public/rules/rule-single-id.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/css-js-manager/public/rules/rule-manager.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/css-js-manager/includes/banner-sample.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/css-js-manager/admin/general-option.php:100
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/css-js-manager/admin/plugins.php:89
    • > PHP Fatal error
      Uncaught Error: Class 'Super_Rule' not found in wp-content/plugins/css-js-manager/public/rules/rule-wp-condition-tags.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/css-js-manager/admin/class-css-js-manager-general-option.php:169
    • > PHP Fatal error
      Uncaught Error: Class 'Super_Rule' not found in wp-content/plugins/css-js-manager/public/rules/rule-wc-condition-tags.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in css-js-manager/assets to your readme.txt
  • Donate link: Invalid url: "piwebsolution.com"
You can look at the official readme.txt

css-js-manager/css-js-manager.php 92% from 13 tests

The principal PHP file in "CSS JS Manager, Async JavaScript, Defer Render Blocking CSS supports WooCommerce" v. 2.4.49.20 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,222 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP264646221,765
SVG5831,345
JavaScript684842
CSS562139
JSON20030
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.37
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods119
▷ Static methods32.52%
▷ Public methods11193.28%
▷ Protected methods00.00%
▷ Private methods86.72%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/background.png74.27KB26.29KB▼ 64.60%