84% sassify

Code Review | Sassify

WordPress plugin Sassify scored84%from 54 tests.

About plugin

  • Plugin page: sassify
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 7, 2015
  • Latest release: Jul 7, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: funkjedi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,493 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.82MB] [CPU: ▼4.25ms] Passed 4 tests

Server-side resources used by Sassify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8144.23 ▲4.77
Dashboard /wp-admin4.12 ▲0.8247.76 ▲2.04
Posts /wp-admin/edit.php4.23 ▲0.8850.13 ▲3.32
Add New Post /wp-admin/post-new.php6.70 ▲0.8282.56 ▼27.13
Media Library /wp-admin/upload.php4.04 ▲0.8240.29 ▲4.81
Sassify /wp-admin/options-general.php?page=sassify4.0134.92

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Sassify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.74 ▲0.471.74 ▲0.1943.46 ▲3.83
Dashboard /wp-admin2,210 ▲195.81 ▲0.94107.23 ▼0.2337.45 ▼2.06
Posts /wp-admin/edit.php2,093 ▲221.99 ▼0.0540.19 ▲5.1334.73 ▲3.76
Add New Post /wp-admin/post-new.php1,517 ▼1617.72 ▼5.71657.07 ▲11.3357.94 ▲0.37
Media Library /wp-admin/upload.php1,392 ▲14.14 ▼0.13105.11 ▲7.8245.18 ▼1.44
Sassify /wp-admin/options-general.php?page=sassify8702.0626.9345.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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 fix the following items
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo_ScssPhp_Formatter' not found in wp-content/plugins/sassify/vendor/scssphp/src/Formatter/Expanded.php:22
    • > PHP Warning
      require_once(SASSIFY_PLUGIN_DIRclass-sassify-admin.php): failed to open stream: No such file or directory in wp-content/plugins/sassify/class-sassify-plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo_ScssPhp_Formatter' not found in wp-content/plugins/sassify/vendor/scssphp/src/Formatter/Compact.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo_ScssPhp_Compiler' not found in wp-content/plugins/sassify/vendor/scssphp/classmap.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo_ScssPhp_Formatter' not found in wp-content/plugins/sassify/vendor/scssphp/src/Formatter/Crunched.php:22
    • > PHP Warning
      Use of undefined constant SASSIFY_PLUGIN_DIR - assumed 'SASSIFY_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sassify/class-sassify-plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sassify/sassify.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'SASSIFY_PLUGIN_DIRclass-sassify-admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/sassify/class-sassify-plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo_ScssPhp_Formatter' not found in wp-content/plugins/sassify/vendor/scssphp/src/Formatter/Compressed.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo_ScssPhp_Formatter' not found in wp-content/plugins/sassify/vendor/scssphp/src/Formatter/Nested.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: scss, sass, css

sassify/sassify.php Passed 13 tests

The main PHP file in "Sassify" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
Adds support for SCSS stylesheets to wp_enqueue_style.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected5,315 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,2998564,738
Markdown21440564
Bourne Shell12313

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity49.35
▷ Minimum class complexity1.00
▷ Maximum class complexity509.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods279
▷ Static methods31.08%
▷ Public methods6322.58%
▷ Protected methods21677.42%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin