89% stream-sage-for-woocommerce

Code Review | Stream Sage for WooCommerce

WordPress plugin Stream Sage for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: stream-sage-for-w...
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jul 13, 2022
  • Latest release: Sep 22, 2022
  • Number of updates: 15
  • Update frequency: every 4.7 days
  • Top authors: shopsage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,071 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Stream Sage for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.79 ▼6.52
Dashboard /wp-admin3.31 ▲0.0048.32 ▼3.12
Posts /wp-admin/edit.php3.36 ▲0.0047.92 ▼0.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.40 ▼13.10
Media Library /wp-admin/upload.php3.23 ▲0.0037.25 ▼4.86

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Stream Sage for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.111.79 ▼0.0144.68 ▼2.06
Dashboard /wp-admin2,195 ▲185.53 ▼0.1184.58 ▼7.1939.65 ▼2.05
Posts /wp-admin/edit.php2,100 ▲31.96 ▼0.0833.81 ▼3.6933.68 ▼1.25
Add New Post /wp-admin/post-new.php1,526 ▼022.90 ▼0.05606.95 ▼79.5555.53 ▲1.28
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0897.91 ▼14.2746.09 ▼4.04

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can look at the official readme.txt

stream-sage-for-woocommerce/streamsage-for-woocommerce.php 69% from 13 tests

The main file in "Stream Sage for WooCommerce" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stream-sage-for-woocommerce.php" instead of "streamsage-for-woocommerce.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.4" instead of "5.6")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,545 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP333897431,446
CSS18049
SVG20034
JavaScript12016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.77
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes13.33%
▷ Concrete classes2996.67%
▷ Final classes00.00%
Methods93
▷ Static methods1212.90%
▷ Public methods8086.02%
▷ Protected methods11.08%
▷ Private methods1212.90%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants00.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
No PNG files were detected