68% lenix-scss-compiler

Code Review | Lenix scss compiler

WordPress plugin Lenix scss compiler scored68%from 54 tests.

About plugin

  • Plugin page: lenix-scss-compiler
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 6.3.1
  • First release: Aug 31, 2017
  • Latest release: May 21, 2022
  • Number of updates: 21
  • Update frequency: every 82.1 days
  • Top authors: yonifre (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /4,176 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
Installer ran successfully

Server metrics [RAM: ▼1.24MB] [CPU: ▼47.14ms] Passed 4 tests

Server-side resources used by Lenix scss compiler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7320.97 ▼25.28
Dashboard /wp-admin2.77 ▼0.5316.25 ▼46.74
Posts /wp-admin/edit.php2.77 ▼0.5819.71 ▼36.76
Add New Post /wp-admin/post-new.php2.77 ▼3.1115.73 ▼79.75
Media Library /wp-admin/upload.php2.77 ▼0.4616.68 ▼25.29
Lenix scss compiler /wp-admin/options-general.php?page=lenix-scss-compiler2.7718.67

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Lenix scss compiler
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.20 ▼1.171.82 ▼0.1038.15 ▼9.16
Dashboard /wp-admin2,225 ▲195.89 ▲0.0898.93 ▼15.1040.86 ▼12.23
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0837.26 ▼5.0431.54 ▼6.04
Add New Post /wp-admin/post-new.php1,548 ▲2223.04 ▲5.56611.84 ▼119.5271.00 ▲10.38
Media Library /wp-admin/upload.php1,404 ▲74.25 ▲0.09113.20 ▼11.8551.79 ▲0.78
Lenix scss compiler /wp-admin/options-general.php?page=lenix-scss-compiler8542.0529.0636.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/lenix-scss-compiler/class/lenix-scss-compiler.php+38
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lenix-scss-compiler
    • > Notice in wp-content/plugins/lenix-scss-compiler/options.php+127
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/lenix-scss-compiler/scssphp/src/Exception/ParserException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/lenix-scss-compiler/scssphp/src/Exception/ServerException.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lenix-scss-compiler/lenix-scss-compiler.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/lenix-scss-compiler/options.php:300
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/lenix-scss-compiler/scssphp/src/Formatter/Compact.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/lenix-scss-compiler/scssphp/src/Exception/RangeException.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ScssPhp\\ScssPhp\\get_option() in wp-content/plugins/lenix-scss-compiler/class/lenix-scss-compiler.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\ode' not found in wp-content/plugins/lenix-scss-compiler/scssphp/src/Node/Number.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/lenix-scss-compiler/scssphp/src/Exception/CompilerException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' not found in wp-content/plugins/lenix-scss-compiler/scssphp/src/Logger/StreamLogger.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: The official readme.txt is a good inspiration

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

This is the main PHP file of "Lenix scss compiler" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
Compiles scss files live on WordPress.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin11,499 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP453,2824,76211,341
JSON10089
Markdown228063
XML1156

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,430)
  • 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 complexity62.24
▷ Minimum class complexity1.00
▷ Maximum class complexity1,430.00
Average method complexity5.63
▷ Minimum method complexity1.00
▷ Maximum method complexity199.00
Code structure
Namespaces9
Interfaces2
Traits0
Classes39
▷ Abstract classes25.13%
▷ Concrete classes3794.87%
▷ Final classes38.11%
Methods525
▷ Static methods315.90%
▷ Public methods16431.24%
▷ Protected methods30558.10%
▷ Private methods5610.67%
Functions28
▷ Named functions27.14%
▷ Anonymous functions2692.86%
Constants77
▷ Global constants56.49%
▷ Class constants7293.51%
▷ Public constants72100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.94KB7.00KB▼ 73.03%