88% rocket-async-css

Code Review | WP Rocket ASYNC CSS

WordPress plugin WP Rocket ASYNC CSS scored 88% from 54 tests.

About plugin

  • Plugin page: rocket-async-css
  • Plugin version: 0.7.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4
  • WordPress version: 5.8.1
  • First release: Apr 20, 2016
  • Latest release: Mar 9, 2020
  • Number of updates: 129
  • Update frequency: every 11.0 days
  • Top authors: pcfreak30 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active / 43,730 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.60MB] [CPU: ▼143.72ms] Passed 4 tests

An overview of server-side resources used by WP Rocket ASYNC CSS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.43 ▲0.5931.15 ▼2.19
Dashboard /wp-admin3.72 ▲0.6541.85 ▼5.39
Posts /wp-admin/edit.php3.76 ▲0.6538.78 ▲4.53
Add New Post /wp-admin/post-new.php6.01 ▲0.5777.06 ▼569.39
Media Library /wp-admin/upload.php3.59 ▲0.5827.97 ▲2.11

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Rocket ASYNC CSS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲7815.92 ▲0.236.28 ▼4.2275.95 ▼0.71
Dashboard /wp-admin2,943 ▲446.05 ▼0.07113.77 ▼18.16165.46 ▼4.19
Posts /wp-admin/edit.php2,753 ▲133.22 ▼0.0061.27 ▼1.52133.76 ▼3.70
Add New Post /wp-admin/post-new.php3,815 ▲11718.22 ▼0.02430.32 ▲15.10168.26 ▲0.73
Media Library /wp-admin/upload.php1,765 ▲135.49 ▼0.03148.30 ▼1.45183.74 ▼1.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rocket-async-css/overrides/divi-booster/124-fix-divi-anchor-link-scrolling/wp_footer_script.php
  • 53× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ComposePress\\Core\\Abstracts\\Manager' not found in wp-content/plugins/rocket-async-css/lib/Rocket/Async/CSS/Integration/Manager.php:5
    • > PHP Fatal error
      Trait 'ComposePress\\Core\\Traits\\BaseObject' not found in wp-content/plugins/rocket-async-css/vendor/composepress/core/src/Traits/Component.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'ComposePress\\Core\\Abstracts\\Component' not found in wp-content/plugins/rocket-async-css/lib/Rocket/Async/CSS/Integration/WPCriticalCSS.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ComposePress\\Core\\Abstracts\\Component' not found in wp-content/plugins/rocket-async-css/lib/Rocket/Async/CSS/Integration/ThePreloader.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'pcfreak30\\WordPress\\Plugin\\Framework\\ComponentAbstract' not found in wp-content/plugins/rocket-async-css/vendor/pcfreak30/wordpress-plugin-framework/src/ManagerAbstract.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ComposePress\\Core\\Abstracts\\Component' not found in wp-content/plugins/rocket-async-css/lib/Rocket/Async/CSS/Integration/VisualComposer.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'pcfreak30\\WordPress\\Plugin\\Framework\\ComponentInterface' not found in wp-content/plugins/rocket-async-css/vendor/pcfreak30/wordpress-plugin-framework/src/BaseObjectAbstract.php:21
    • > PHP Fatal error
      Trait 'Rocket\\Async\\CSS\\DOMElementTrait' not found in wp-content/plugins/rocket-async-css/lib/Rocket/Async/CSS/DOMDocument.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'ComposePress\\Core\\Abstracts\\Component' not found in wp-content/plugins/rocket-async-css/lib/Rocket/Async/CSS/Integration/Elementor.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'ComposePress\\Core\\Abstracts\\Component' not found in wp-content/plugins/rocket-async-css/lib/Rocket/Async/CSS/Integration/MetaSlider.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === rocket-async-css === )
Please take inspiration from this readme.txt

rocket-async-css/rocket-async-css.php Passed 13 tests

This is the main PHP file of "WP Rocket ASYNC CSS" version 0.7.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
WordPress plugin to combine all CSS load async including inline scripts. Extends WP-Rocket

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected5,199 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP821,2741,9084,886
JSON800312
JavaScript1041

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.36
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces15
Interfaces2
Traits3
Classes67
▷ Abstract classes68.96%
▷ Concrete classes6191.04%
▷ Final classes00.00%
Methods396
▷ Static methods123.03%
▷ Public methods30677.27%
▷ Protected methods297.32%
▷ Private methods6115.40%
Functions28
▷ Named functions1242.86%
▷ Anonymous functions1657.14%
Constants31
▷ Global constants1135.48%
▷ Class constants2064.52%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin