83% scss-library

Code Review | SCSS-Library

WordPress plugin SCSS-Library scored83%from 54 tests.

About plugin

  • Plugin page: scss-library
  • Plugin version: 0.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Jan 24, 2023
  • Number of updates: 32
  • Update frequency: every 38.9 days
  • Top authors: sebaxtian (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /7,480 total downloads

Benchmarks

Plugin footprint 82% 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.03MB] [CPU: ▼1.36ms] Passed 4 tests

Server-side resources used by SCSS-Library
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.27 ▼1.47
Dashboard /wp-admin3.33 ▲0.0243.82 ▼4.16
Posts /wp-admin/edit.php3.44 ▲0.0848.50 ▲1.94
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.92 ▼1.76
Media Library /wp-admin/upload.php3.25 ▲0.0235.64 ▲2.07

Server storage [IO: ▲0.68MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/scss-library/" and "wp-content/uploads/"
    • (new file) wp-content/build/scss_library/.empty
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

SCSS-Library: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8614.47 ▲0.091.65 ▼0.3940.10 ▲0.77
Dashboard /wp-admin2,222 ▲344.81 ▼0.15109.30 ▲6.9439.11 ▼3.67
Posts /wp-admin/edit.php2,105 ▲162.06 ▲0.0540.19 ▲4.2135.52 ▼4.42
Add New Post /wp-admin/post-new.php1,543 ▲2922.98 ▲5.48690.25 ▼4.1258.66 ▲7.20
Media Library /wp-admin/upload.php1,407 ▲224.17 ▼0.02106.48 ▲4.8245.08 ▼1.78

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 33× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Trait 'Baxtian\\SingletonTrait' not found in wp-content/plugins/scss-library/src/Settings/ScssLibrary.php on line 27
    • > PHP Fatal error
      Trait 'Baxtian\\SingletonTrait' not found in wp-content/plugins/scss-library/src/Libs/CheckDirectory.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/scss-library/vendor/scssphp/scssphp/src/Block/EachBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/scss-library/vendor/scssphp/scssphp/src/Exception/ServerException.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/scss-library/vendor/scssphp/scssphp/src/Formatter/Debug.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/scss-library/vendor/scssphp/scssphp/src/Block/ForBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/scss-library/vendor/scssphp/scssphp/src/Exception/ParserException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\ode' not found in wp-content/plugins/scss-library/vendor/scssphp/scssphp/src/Node/Number.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/scss-library/vendor/scssphp/scssphp/src/Formatter/Compressed.php:24
    • > PHP Fatal error
      Trait 'Baxtian\\Singleton' not found in wp-content/plugins/scss-library/src/ScssLibrary.php on line 29

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: sass, compiler, scss

scss-library/scss-library.php 92% from 13 tests

The entry point to "SCSS-Library" version 0.4.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected14,018 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP793,8246,58513,440
JSON300297
PO File23240142
Markdown3620139

PHP code 0% from 2 tests

A short 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,493)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity41.49
▷ Minimum class complexity1.00
▷ Maximum class complexity1,493.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces17
Interfaces2
Traits2
Classes65
▷ Abstract classes23.08%
▷ Concrete classes6396.92%
▷ Final classes34.76%
Methods625
▷ Static methods558.80%
▷ Public methods24839.68%
▷ Protected methods32652.16%
▷ Private methods518.16%
Functions27
▷ Named functions13.70%
▷ Anonymous functions2696.30%
Constants75
▷ Global constants00.00%
▷ Class constants75100.00%
▷ Public constants75100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected