90% custom-emails-for-woocommerce

Code Review | Custom Emails for WooCommerce

WordPress plugin Custom Emails for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: custom-emails-for...
  • Plugin version: 2.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Jul 29, 2021
  • Latest release: Nov 30, 2023
  • Number of updates: 53
  • Update frequency: every 16.1 days
  • Top authors: wpcodefactory (56.6%)algoritmika (45.28%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /17,218 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Custom Emails for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.58 ▼7.72
Dashboard /wp-admin3.32 ▼0.0245.00 ▼16.60
Posts /wp-admin/edit.php3.38 ▲0.0247.02 ▲2.29
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.82 ▼3.42
Media Library /wp-admin/upload.php3.25 ▲0.0234.39 ▲0.40

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Custom Emails for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.24 ▼0.521.68 ▼0.1337.58 ▼5.55
Dashboard /wp-admin2,198 ▲205.62 ▼0.0690.86 ▼27.2938.49 ▼5.61
Posts /wp-admin/edit.php2,097 ▼31.98 ▲0.0341.00 ▲2.6434.94 ▲1.85
Add New Post /wp-admin/post-new.php1,528 ▼723.30 ▼1.97639.88 ▲1.0064.56 ▼11.52
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0293.94 ▼5.5140.92 ▼2.31

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: woo commerce, custom email, custom emails, emails, email...

custom-emails-for-woocommerce/custom-emails-for-woocommerce.php Passed 13 tests

The entry point to "Custom Emails for WooCommerce" version 2.6.0 is a PHP file that has certain tags in its header comment area
33 characters long description:
Add custom emails to WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,169 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP154051,3912,169

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity31.27
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods146
▷ Static methods10.68%
▷ Public methods146100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected