83% jvh-easy-scss-and-js

Code Review | Easy SCSS and JS

WordPress plugin Easy SCSS and JS scored 83% from 54 tests.

About plugin

  • Plugin page: jvh-easy-scss-and-js
  • Plugin version: 2.5.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 19, 2020
  • Latest release: Sep 5, 2022
  • Number of updates: 48
  • Update frequency: every 18.8 days
  • Top authors: Lars- (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,801 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.96ms] Passed 4 tests

Server-side resources used by Easy SCSS and JS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.25 ▼1.55
Dashboard /wp-admin3.31 ▲0.0146.17 ▼3.95
Posts /wp-admin/edit.php3.42 ▲0.0749.08 ▲4.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.70 ▲3.07
Media Library /wp-admin/upload.php3.23 ▲0.0033.00 ▼1.40

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Easy SCSS and JS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.44 ▲0.071.57 ▼0.2238.26 ▼7.68
Dashboard /wp-admin2,203 ▲155.82 ▼0.0894.46 ▼22.1738.56 ▼6.62
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0539.79 ▲6.4034.33 ▼1.54
Add New Post /wp-admin/post-new.php1,514 ▼017.66 ▲0.12597.84 ▼126.0845.60 ▼7.01
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.1296.22 ▼7.8341.18 ▼2.82

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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 | 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
Almost there! Just fix the following items
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Block/MediaBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Block/ElseBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Formatter/Compact.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Logger/QuietLogger.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Block/DirectiveBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\ode' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Node/Number.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Block/ForBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Exception/ParserException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Formatter/Nested.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/jvh-easy-scss-and-js/vendor/scssphp/src/Block/ElseifBlock.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: easyscss, scss, easy, js, url...

jvh-easy-scss-and-js/init.php 92% from 13 tests

The entry point to "Easy SCSS and JS" version 2.5.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jvh-easy-scss-and-js.php" instead of "init.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin11,808 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP563,4095,52211,808

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of classes 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 complexity51.06
▷ Minimum class complexity1.00
▷ Maximum class complexity1,493.00
Average method complexity5.57
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces12
Interfaces2
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes36.12%
Methods562
▷ Static methods376.58%
▷ Public methods17831.67%
▷ Protected methods31956.76%
▷ Private methods6511.57%
Functions25
▷ Named functions00.00%
▷ Anonymous functions25100.00%
Constants72
▷ Global constants00.00%
▷ Class constants72100.00%
▷ Public constants72100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin