83% custom-css-for-blocks

Code Review | Custom CSS for Blocks

WordPress plugin Custom CSS for Blocks scored83%from 54 tests.

About plugin

  • Plugin page: custom-css-for-bl...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Dec 28, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wpbits (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /166 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.21ms] Passed 4 tests

Server-side resources used by Custom CSS for Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.06 ▲1.50
Dashboard /wp-admin3.32 ▲0.0143.62 ▼0.02
Posts /wp-admin/edit.php3.37 ▲0.0147.12 ▲3.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.29 ▼15.96
Media Library /wp-admin/upload.php3.24 ▲0.0133.53 ▼2.34

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Custom CSS for Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.28 ▼0.071.59 ▼0.3042.48 ▲3.94
Dashboard /wp-admin2,195 ▲235.56 ▼0.1585.40 ▼14.5639.46 ▼2.61
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0638.81 ▲4.1536.28 ▲0.02
Add New Post /wp-admin/post-new.php1,540 ▲1424.90 ▲1.01690.32 ▼6.4860.60 ▲7.82
Media Library /wp-admin/upload.php1,403 ▼04.16 ▼0.0396.73 ▼4.1943.39 ▼0.92

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

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 25× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Block/AtRootBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Formatter/Nested.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Formatter/Compressed.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Exception/RangeException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Exception/ParserException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\ode' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Node/Number.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Formatter/Crunched.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Formatter/Debug.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Block/CallableBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/custom-css-for-blocks/php-vendor/scssphp/src/Exception/CompilerException.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: editor, css, custom css, custom block design, block customization...

custom-css-for-blocks/custom-css-for-blocks.php 92% from 13 tests

The main PHP script in "Custom CSS for Blocks" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path folder was not found ("/i18n/languages/")

Code Analysis 95% 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
No dangerous file extensions were detected11,691 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code

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 should be reduced to less than 1000 (currently 1,484)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity51.46
▷ Minimum class complexity1.00
▷ Maximum class complexity1,484.00
Average method complexity5.74
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes36.52%
▷ Static methods316.01%
▷ Public methods16531.98%
▷ Protected methods30559.11%
▷ Private methods468.91%
▷ Named functions1230.00%
▷ Anonymous functions2870.00%
▷ Global constants34.00%
▷ Class constants7296.00%
▷ Public constants72100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin