61% best-css-compiler

Code Review | WOW Best CSS Compiler

WordPress plugin WOW Best CSS Compiler scored61%from 54 tests.

About plugin

  • Plugin page: best-css-compiler
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2021
  • Latest release: Oct 30, 2022
  • Number of updates: 8
  • Update frequency: every 53.9 days
  • Top authors: baonguyenyam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /579 total downloads

Benchmarks

Plugin footprint 65% from 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.31MB] [CPU: ▼4.85ms] Passed 4 tests

An overview of server-side resources used by WOW Best CSS Compiler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2732.27 ▼13.77
Dashboard /wp-admin3.69 ▲0.3453.11 ▼9.18
Posts /wp-admin/edit.php3.73 ▲0.3756.41 ▲7.04
Add New Post /wp-admin/post-new.php6.21 ▲0.3387.47 ▼3.50
Media Library /wp-admin/upload.php3.52 ▲0.2941.33 ▲8.22
CSS Compiler /wp-admin/admin.php?page=best-css-compiler3.5639.75

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 525 new files
Database: 1 new table, 6 new options
New tables
wp_best_css_compiler_data
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WOW Best CSS Compiler
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,139 ▲39320.40 ▲6.121.95 ▲0.0342.83 ▼0.15
Dashboard /wp-admin2,523 ▲33510.88 ▲5.98221.82 ▲101.6538.81 ▼7.87
Posts /wp-admin/edit.php2,431 ▲3457.48 ▲5.4695.64 ▲59.1336.54 ▼1.02
Add New Post /wp-admin/post-new.php1,635 ▲10220.80 ▼2.22729.73 ▲76.7035.14 ▼14.52
Media Library /wp-admin/upload.php1,564 ▲1828.68 ▲4.45119.42 ▲20.7041.13 ▼1.32
Compiler Settings /wp-admin/crb_carbon_fields_container_compiler_settings.php260.440.1213.57
CSS Compiler /wp-admin/admin.php?page=best-css-compiler1,2527.2774.4025.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_best_css_compiler_data
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 130× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Datastore\\Datastore_Interface' not found in wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/core/Datastore/Datastore.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Scalar_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/best-css-compiler/vendor/scssphp/scssphp/src/Exception/ParserException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Ancestor_ID_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Date_Field' not found in wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/core/Field/Time_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Predefined_Options_Field' not found in wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/core/Field/Multiselect_Field.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/core/Container/Condition/Blog_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/best-css-compiler/vendor/scssphp/scssphp/src/Exception/ServerException.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/best-css-compiler/vendor/scssphp/scssphp/src/Formatter/Compact.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/best-css-compiler/vendor/htmlburger/carbon-fields/core/Field/Html_Field.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/crb_carbon_fields_container_compiler_settings.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_compiler_settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=best-css-compiler
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,moxiejs,plupload,wp-codemirror&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'value')" "TypeError: Cannot read properties of undefined (reading 'value')\n at Function.fg [as fromTextArea] (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,moxiejs,plupload,wp-codemirror&ver=6.3.1:34:31506)\n at d.codeEditor.initialize (/wp-admin/js/code-editor.min.js?ver=6.3.1:2:1977)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/best-css-compiler/admin/js/admin.js?ver=2.0.2:33:16)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,moxiejs,plupload,wp-codemirror&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,moxiejs,plupload,wp-codemirror&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=best-css-compiler
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,moxiejs,plupload,wp-codemirror&ver=6.3.1 33:31505 Uncaught TypeError: Cannot read properties of undefined (reading 'value')

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === best-css-compiler === )
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in best-css-compiler/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

best-css-compiler/nguyen-app.php 85% from 13 tests

The main PHP file in "WOW Best CSS Compiler" ver. 2.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 197 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("best-css-compiler.php" instead of "nguyen-app.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin39,846 lines of code in 468 files:
LanguageFilesBlank linesComment linesLines of code
PHP2015,83711,91520,457
JavaScript1725,1908,45912,966
PO File268191,0202,202
CSS103371,1441,784
Sass4833901,769
JSON500531
Markdown5520131
XML1156

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,431)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 199)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.28
▷ Minimum class complexity1.00
▷ Maximum class complexity1,431.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity199.00
Code structure
Namespaces32
Interfaces7
Traits0
Classes165
▷ Abstract classes137.88%
▷ Concrete classes15292.12%
▷ Final classes42.63%
Methods1,449
▷ Static methods1379.45%
▷ Public methods92864.04%
▷ Protected methods47032.44%
▷ Private methods513.52%
Functions129
▷ Named functions2418.60%
▷ Anonymous functions10581.40%
Constants103
▷ Global constants87.77%
▷ Class constants9592.23%
▷ Public constants95100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png4.67KB1.93KB▼ 58.64%