99% email-text-customizer-for-woocommerce

Code Review | Email Text Customizer for WooCommerce

WordPress plugin Email Text Customizer for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: email-text-custom...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.8
  • WordPress version: 5.9.2
  • First release: May 8, 2017
  • Latest release: Jun 15, 2017
  • Number of updates: 11
  • Update frequency: every 3.6 days
  • Top authors: EnigmaWeb (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active / 12,392 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Email Text Customizer for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0259.81 ▲1.73
Dashboard /wp-admin3.42 ▲0.0234.69 ▼1.73
Posts /wp-admin/edit.php3.66 ▲0.0236.89 ▼10.35
Add New Post /wp-admin/post-new.php6.89 ▼0.0794.37 ▼1,190.52
Media Library /wp-admin/upload.php3.31 ▲0.0135.58 ▲9.87

Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • Illegal file modification found: 18 files (40.52KB) outside of "wp-content/plugins/email-text-customizer-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/admin-new-order.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/customer-new-account.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/admin-failed-order.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/customer-processing-order.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/customer-invoice.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/customer-completed-order.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/customer-note.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/customer-on-hold-order.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/customer-refunded-order.php
    • (new file) wp-content/themes/twentytwentytwo/woocommerce/emails/admin-cancelled-order.php
    • ...
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Email Text Customizer for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲4915.99 ▲0.825.65 ▼2.112.18 ▼0.27
Dashboard /wp-admin2,881 ▲236.10 ▼0.08119.80 ▼24.27161.96 ▼2.21
Posts /wp-admin/edit.php2,685 ▼63.23 ▼0.0087.41 ▲24.16144.42 ▼0.05
Add New Post /wp-admin/post-new.php1,661 ▼2916.36 ▼4.38448.77 ▲23.99171.93 ▼0.29
Media Library /wp-admin/upload.php1,695 ▼05.51 ▲0.01142.58 ▲1.64195.51 ▼36.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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
Everything seems fine, however 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
Looking good! No server-side errors or output on direct access of PHP files

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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: email text customizer, woo, email, woocommerce, customize emails...

email-text-customizer-for-woocommerce/email-text-customizer-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Email Text Customizer for WooCommerce" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected753 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP20320576753

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity1.58
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png23.95KB13.06KB▼ 45.46%
screenshot-1.png77.16KB32.75KB▼ 57.55%