84% simple-scss-compiler

Code Review | Simple SCSS Compiler

WordPress plugin Simple SCSS Compiler scored84%from 54 tests.

About plugin

  • Plugin page: simple-scss-compiler
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 10, 2022
  • Latest release: Feb 10, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kidadavid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Simple SCSS Compiler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.05 ▼5.21
Dashboard /wp-admin3.31 ▲0.0150.03 ▼3.37
Posts /wp-admin/edit.php3.36 ▲0.0149.95 ▲2.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.30 ▼14.79
Media Library /wp-admin/upload.php3.24 ▲0.0135.43 ▲2.03
Simple SCSS Compiler /wp-admin/options-general.php?page=sscssc-settings3.2029.37

Server storage [IO: ▲0.54MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple SCSS Compiler
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.31 ▼1.061.73 ▲0.0141.05 ▼2.81
Dashboard /wp-admin2,211 ▲265.88 ▲0.86123.20 ▲8.6047.14 ▲3.32
Posts /wp-admin/edit.php2,097 ▲82.07 ▲0.0235.79 ▲0.7531.70 ▼0.98
Add New Post /wp-admin/post-new.php1,522 ▼1123.26 ▲2.16626.46 ▼61.8657.11 ▼0.88
Media Library /wp-admin/upload.php1,393 ▲24.20 ▼0.0094.29 ▼8.0639.46 ▼6.31
Simple SCSS Compiler /wp-admin/options-general.php?page=sscssc-settings7992.0825.5828.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Exception/CompilerException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\ode' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Node/Number.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Block/ElseBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Block/AtRootBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Block/ContentBlock.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Formatter/Debug.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Exception/RangeException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Block/ElseifBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Logger/StreamLogger.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/simple-scss-compiler/vendors/scssphp-1.10.0/src/Exception/ServerException.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 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
5 plugin tags: scss, simple, css, development, compiler

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

The principal PHP file in "Simple SCSS Compiler" v. 1.0 is loaded by WordPress automatically on each request
66 characters long description:
Adds a simple way to compile your scss files to css automatically.

Code Analysis 95% from 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
Success! There were no dangerous files found in this plugin11,712 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP573,3255,27611,415
JSON100111
JavaScript115880
Markdown228063
CSS10037
XML1156

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,488)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 199)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity48.89
▷ Minimum class complexity1.00
▷ Maximum class complexity1,488.00
Average method complexity5.66
▷ Minimum method complexity1.00
▷ Maximum method complexity199.00
Code structure
Namespaces10
Interfaces2
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes36.12%
Methods527
▷ Static methods315.88%
▷ Public methods17633.40%
▷ Protected methods30557.87%
▷ Private methods468.73%
Functions25
▷ Named functions00.00%
▷ Anonymous functions25100.00%
Constants75
▷ 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
PNG images were not found in this plugin