73% sass-compiler

Code Review | SASS Compiler

WordPress plugin SASS Compiler scored73%from 54 tests.

About plugin

  • Plugin page: sass-compiler
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 19, 2014
  • Latest release: Oct 19, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: WebMaestro.Fr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,896 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.23MB] [CPU: ▼41.83ms] Passed 4 tests

Analyzing server-side resources used by SASS Compiler
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7214.41 ▼28.90
Dashboard /wp-admin2.78 ▼0.5216.97 ▼29.39
Posts /wp-admin/edit.php2.79 ▼0.5716.38 ▼28.98
Add New Post /wp-admin/post-new.php2.78 ▼3.1016.74 ▼80.04
Media Library /wp-admin/upload.php2.78 ▼0.4416.83 ▼21.68

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

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/sass-compiler/" and "wp-content/uploads/"
    • (new file) wp-content/cache/.empty
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
sass_variables_defaults
can_compress_scripts
sass_compiler
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SASS Compiler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.24 ▼0.311.86 ▼0.1544.44 ▼1.76
Dashboard /wp-admin2,195 ▲185.56 ▲0.0296.18 ▲4.5578.90 ▲34.93
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0436.86 ▲1.6333.37 ▼2.73
Add New Post /wp-admin/post-new.php1,539 ▲1123.57 ▲0.54666.87 ▼29.5863.07 ▲10.48
Media Library /wp-admin/upload.php1,415 ▲154.22 ▼0.0296.54 ▼18.3573.84 ▲25.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/sass-compiler/plugin.php+131
    array_filter() expects parameter 1 to be array, bool given
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • sass_compiler
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • sass_variables_defaults

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sass-compiler/plugin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sass-compiler/libs/wm-settings/wm-settings.php:395

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === sass-compiler === )
You can take inspiration from this readme.txt

sass-compiler/plugin.php 85% from 13 tests

The main file in "SASS Compiler" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sass-compiler.php" instead of "plugin.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin11,485 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript57729437,058
PHP37434154,108
CSS33924319

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity123.38
▷ Minimum class complexity1.00
▷ Maximum class complexity467.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods245
▷ Static methods176.94%
▷ Public methods5422.04%
▷ Protected methods18475.10%
▷ Private methods72.86%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/seal-black-reversed-b19dd117.png18.40KB8.40KB▼ 54.36%
img/menu-icon.png0.73KB0.79KB0.00%