67% super-transactional-emails-for-woocommerce

Code Review | STEWoo - Super Transactional Emails for WooCommerce

WordPress plugin STEWoo - Super Transactional Emails for WooCommerce scored 67% from 54 tests.

About plugin

  • Plugin page: super-transaction...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-5.6
  • WordPress version: 5.9.2
  • First release: Apr 4, 2019
  • Latest release: Dec 17, 2020
  • Number of updates: 20
  • Update frequency: every 41.3 days
  • Top authors: BorisColombier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 622 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.43MB] [CPU: ▼297.78ms] Passed 4 tests

This is a short check of server-side resources used by STEWoo - Super Transactional Emails for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4072.70 ▲17.71
Dashboard /wp-admin3.92 ▲0.5136.85 ▲3.79
Posts /wp-admin/edit.php4.14 ▲0.5042.74 ▲3.80
Add New Post /wp-admin/post-new.php7.39 ▲0.4194.50 ▼1,198.06
Media Library /wp-admin/upload.php3.71 ▲0.4130.91 ▼0.65
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius4.0626.47

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 217 new files
Database: no new tables, 4 new options
New WordPress options
fs_debug_mode
fs_accounts
fs_gdpr
fs_active_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for STEWoo - Super Transactional Emails for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,802 ▲8015.70 ▼0.085.45 ▼0.621.95 ▼0.42
Dashboard /wp-admin2,920 ▲556.12 ▼0.03125.27 ▼51.94192.23 ▲21.41
Posts /wp-admin/edit.php2,726 ▲413.23 ▲0.0064.60 ▼0.46161.60 ▼46.95
Add New Post /wp-admin/post-new.php1,673 ▲716.62 ▼4.04406.62 ▼40.30196.46 ▲34.15
Media Library /wp-admin/upload.php1,730 ▲325.51 ▲0.04142.48 ▼4.23300.63 ▲109.39
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4502.4953.81116.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/includes/class-freemius.php+8540
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 4 options
    • fs_debug_mode
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/ajax-loader.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/super-transactional-emails-for-woocommerce/inc/class-stewoo-custom-controls.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/super-transactional-emails-for-woocommerce/freemius/templates/account/partials/addon.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% 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
6 plugin tags: ecommerce, emails, woocommerce, marketing, email...

super-transactional-emails-for-woocommerce/super-transactional-email.php 69% from 13 tests

The main PHP file in "STEWoo - Super Transactional Emails for WooCommerce" ver. 1.2.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("super-transactional-emails-for-woocommerce.php" instead of "super-transactional-email.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "2.3")
  • Description: Please don't use more than 140 characters for the plugin description (currently 148 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected47,680 lines of code in 171 files:
LanguageFilesBlank linesComment linesLines of code
PHP1157,38216,15231,735
PO File115,8117,02012,814
Sass28399772,515
JavaScript56769505
CSS1221111

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity75.27
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,193
▷ Static methods18515.51%
▷ Public methods84570.83%
▷ Protected methods151.26%
▷ Private methods33327.91%
Functions97
▷ Named functions97100.00%
▷ Anonymous functions00.00%
Constants128
▷ Global constants10279.69%
▷ Class constants2620.31%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/stewoo_logo_large.png3.95KB3.79KB▼ 4.15%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/images/stewoo_logo.png5.38KB2.30KB▼ 57.13%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%