94% woo-custom-emails

Code Review | Woo Custom Emails

WordPress plugin Woo Custom Emails scored 94% from 54 tests.

About plugin

  • Plugin page: woo-custom-emails
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.5
  • WordPress version: 5.9.2
  • First release: Aug 5, 2015
  • Latest release: Apr 10, 2018
  • Number of updates: 23
  • Update frequency: every 42.6 days
  • Top authors: mehulkaklotar (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active / 34,726 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Woo Custom Emails
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1758.70 ▲7.55
Dashboard /wp-admin3.52 ▲0.1136.70 ▲3.58
Posts /wp-admin/edit.php3.74 ▲0.1044.16 ▲6.46
Add New Post /wp-admin/post-new.php6.98 ▲0.0194.12 ▼1,143.33
Media Library /wp-admin/upload.php3.40 ▲0.1031.77 ▲3.68
Custom Emails /wp-admin/admin.php?page=wcemails-settings3.3446.37

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Custom Emails
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2915.52 ▼0.175.80 ▼0.042.14 ▼0.48
Dashboard /wp-admin2,895 ▲426.03 ▼0.20120.74 ▼7.58155.97 ▼4.94
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0071.96 ▼22.30157.86 ▲14.37
Add New Post /wp-admin/post-new.php1,661 ▼3716.00 ▼5.89417.08 ▼15.09163.95 ▼0.36
Media Library /wp-admin/upload.php1,695 ▼05.54 ▲0.05146.13 ▲0.69193.38 ▲3.40
Custom Emails /wp-admin/admin.php?page=wcemails-settings8041.9736.8071.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-custom-emails/admin/class-wcemails-list.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woo-custom-emails/admin/class-wcemails-list.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-custom-emails/admin/class-wcemails-list.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: custom email template, email, woocommerce custom emails, woo custom emails, woocommerce...

woo-custom-emails/woo-custom-emails.php Passed 13 tests

The primary PHP file in "Woo Custom Emails" version 2.2 is used by WordPress to initiate all plugin functionality
48 characters long description:
A woocommerce add on to support customize emails

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
No dangerous file extensions were detected886 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4195209798
Markdown136077
JavaScript20011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity30.00
▷ Minimum class complexity5.00
▷ Maximum class complexity85.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods50
▷ Static methods24.00%
▷ Public methods4794.00%
▷ Protected methods00.00%
▷ Private methods36.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
PNG images were not found in this plugin