72% happy-scss-compiler

Code Review | SCSS Happy Compiler - Compile SCSS to CSS & Automatic Enqueue

WordPress plugin SCSS Happy Compiler - Compile SCSS to CSS & Automatic Enqueue scored72%from 54 tests.

About plugin

  • Plugin page: happy-scss-compiler
  • Plugin version: 1.3.10
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Sep 4, 2021
  • Latest release: Oct 28, 2022
  • Number of updates: 45
  • Update frequency: every 9.4 days
  • Top authors: happymonkeyagency (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /6,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼5.60ms] Passed 4 tests

A check of server-side resources used by SCSS Happy Compiler - Compile SCSS to CSS & Automatic Enqueue
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1936.55 ▼5.69
Dashboard /wp-admin3.50 ▲0.1945.49 ▼5.18
Posts /wp-admin/edit.php3.61 ▲0.2551.64 ▲4.37
Add New Post /wp-admin/post-new.php6.10 ▲0.2185.28 ▼12.24
Media Library /wp-admin/upload.php3.42 ▲0.1935.37 ▲0.70
Happy WP SCSS /wp-admin/options-general.php?page=happy-scss-compiler3.3929.95

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 16 new options
New WordPress options
theysaidso_admin_options
hm_wp_scss__enqueuing
hm_wp_scss__adv_path_css
widget_theysaidso_widget
can_compress_scripts
hm_wp_scss__compilation_time
hm_wp_scss__scss_location
hm_wp_scss__compilation_mode
hm_wp_scss__adv_path_scss
hm_wp_scss__errors_display
...

Browser metrics Passed 4 tests

A check of browser resources used by SCSS Happy Compiler - Compile SCSS to CSS & Automatic Enqueue
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.47 ▼1.281.71 ▲0.1243.45 ▲0.34
Dashboard /wp-admin2,218 ▲335.18 ▼0.68112.79 ▲14.7140.22 ▼5.27
Posts /wp-admin/edit.php2,104 ▲152.31 ▲0.2640.54 ▲2.7834.57 ▲2.43
Add New Post /wp-admin/post-new.php1,528 ▲1423.69 ▲6.08659.15 ▼20.3859.28 ▲3.66
Media Library /wp-admin/upload.php1,400 ▲94.49 ▲0.3197.24 ▲1.5643.40 ▲3.77
Happy WP SCSS /wp-admin/options-general.php?page=happy-scss-compiler1,1153.3766.3244.36

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 16 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • hm_wp_scss__compilation_mode
    • hm_wp_scss__no_compilation_underscore
    • hm_wp_scss__css_location
    • hm_wp_scss__source_map_file
    • hm_wp_scss__errors_display
    • hm_wp_scss__scss_location
    • can_compress_scripts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=happy-scss-compiler
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=happy-scss-compiler
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/happy-scss-compiler/public/partials/hm-wp-scss-public-display.php
  • 27× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Logger/QuietLogger.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Formatter/Debug.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/happy-scss-compiler/admin/partials/hm_wp_scss_main_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Exception/RangeException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Logger/StreamLogger.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Formatter/Compressed.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Formatter/Compact.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Exception/ParserException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Block/WhileBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/happy-scss-compiler/includes/scssphp/src/Block/ContentBlock.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

happy-scss-compiler/happy-scss-compiler.php Passed 13 tests

The main PHP script in "SCSS Happy Compiler - Compile SCSS to CSS & Automatic Enqueue" version 1.3.10 is automatically included on every request by WordPress
80 characters long description:
Compile your SCSS code to CSS automatically, and choose when and how to compile.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin15,044 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP643,4915,80412,252
JavaScript123158992,131
Markdown4510300
JSON200203
XML500107
CSS32951

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,493)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity47.61
▷ Minimum class complexity1.00
▷ Maximum class complexity1,493.00
Average method complexity5.41
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces10
Interfaces2
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes35.66%
Methods576
▷ Static methods335.73%
▷ Public methods20735.94%
▷ Protected methods30552.95%
▷ Private methods6411.11%
Functions31
▷ Named functions516.13%
▷ Anonymous functions2683.87%
Constants76
▷ Global constants45.26%
▷ Class constants7294.74%
▷ Public constants72100.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