89% defer-transictional-emails-for-woocommerce

Code Review | Defer Transactional Emails for WooCommerce

WordPress plugin Defer Transactional Emails for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: defer-transiction...
  • Plugin version: 0.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: May 17, 2022
  • Latest release: Nov 1, 2023
  • Number of updates: 10
  • Update frequency: every 53.3 days
  • Top authors: giuse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,073 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.75ms] Passed 4 tests

Server-side resources used by Defer Transactional Emails for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.34 ▲0.49
Dashboard /wp-admin3.31 ▼0.0446.33 ▼17.19
Posts /wp-admin/edit.php3.36 ▲0.0050.24 ▲3.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.51 ▼21.24
Media Library /wp-admin/upload.php3.23 ▲0.0037.92 ▲2.94

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

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

Browser metrics Passed 4 tests

Defer Transactional Emails for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.34 ▼0.282.18 ▲0.4439.35 ▼4.43
Dashboard /wp-admin2,195 ▲185.62 ▼0.0686.13 ▼1.1738.63 ▲1.78
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0239.66 ▼0.4236.43 ▲0.11
Add New Post /wp-admin/post-new.php1,526 ▼1123.20 ▲4.66670.02 ▲31.3863.92 ▼11.27
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.0297.79 ▼2.1141.72 ▼0.37

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

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 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: "buymeacoffee.com/josem"
Please take inspiration from this readme.txt

defer-transictional-emails-for-woocommerce/defer-transactional-emails-for-woocommerce.php 77% from 13 tests

The main PHP file in "Defer Transactional Emails for WooCommerce" ver. 0.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("defer-transictional-emails-for-woocommerce.php" instead of "defer-transactional-emails-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin4 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22194

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
There are no PNG files in this plugin