83% send-emails-for-woocommerce

Code Review | WooCommerce Send Emails

WordPress plugin WooCommerce Send Emails scored83%from 54 tests.

About plugin

  • Plugin page: send-emails-for-w...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 12, 2016
  • Latest release: Apr 8, 2017
  • Number of updates: 31
  • Update frequency: every 5.7 days
  • Top authors: stuartobrien (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /7,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.73ms] Passed 4 tests

Server-side resources used by WooCommerce Send Emails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.67 ▲3.97
Dashboard /wp-admin3.39 ▲0.0842.97 ▼4.26
Posts /wp-admin/edit.php3.50 ▲0.1443.61 ▼1.81
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.15 ▼9.49
Media Library /wp-admin/upload.php3.31 ▲0.0833.88 ▼3.34

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

WooCommerce Send Emails: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6714.74 ▲0.101.71 ▼0.1445.68 ▲7.30
Dashboard /wp-admin2,219 ▲335.85 ▲0.96109.05 ▲0.1244.21 ▲3.98
Posts /wp-admin/edit.php2,102 ▲131.97 ▼0.0941.81 ▼0.3934.99 ▼1.01
Add New Post /wp-admin/post-new.php1,558 ▲2518.44 ▼4.54603.84 ▼75.1548.01 ▼11.78
Media Library /wp-admin/upload.php1,401 ▲134.19 ▼0.05100.29 ▼12.1244.45 ▼2.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/send-emails-for-woocommerce/pages/template-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Requires at least: Invalid plugin version format
  • Screenshots: Add an image for screenshot #1 (Specify an email address and click "Send Email" (this will be pre-populated with the billing address of the order).)
You can look at the official readme.txt

send-emails-for-woocommerce/index.php 77% from 13 tests

The main PHP file in "WooCommerce Send Emails" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("send-emails-for-woocommerce.php" instead of "index.php")
  • Domain Path: The domain path folder was not found ("/localization/")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,852 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36313762,396
CSS910882570
PHP3195236560
HTML1110298
JSON10016
SVG10012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods521.74%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.27MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png114.35KB46.63KB▼ 59.22%
screenshot-2.png135.31KB49.71KB▼ 63.26%
assets/images/help-icon.png1.16KB0.22KB▼ 80.73%
assets/images/pe-icon.png1.18KB0.43KB▼ 63.61%
screenshot-1.png19.53KB3.05KB▼ 84.39%