84% decorator-woocommerce-email-customizer

Code Review | Decorator - WooCommerce Email Customizer

WordPress plugin Decorator - WooCommerce Email Customizer scored84%from 54 tests.

About plugin

  • Plugin page: decorator-woocomm...
  • Plugin version: 1.2.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Nov 2, 2023
  • Number of updates: 36
  • Update frequency: every 69.8 days
  • Top authors: webtoffee (69.44%)RightPress (33.33%)

Code review

54 tests

User reviews

34 reviews

Install metrics

10,000+ active /140,533 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.44ms] Passed 4 tests

An overview of server-side resources used by Decorator - WooCommerce Email Customizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.88 ▲3.20
Dashboard /wp-admin3.37 ▲0.0246.75 ▼15.54
Posts /wp-admin/edit.php3.48 ▲0.1244.92 ▼3.70
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.52 ▼20.44
Media Library /wp-admin/upload.php3.29 ▲0.0636.09 ▼2.06

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 137 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Decorator - WooCommerce Email Customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.38 ▼0.231.70 ▼0.0246.16 ▲2.89
Dashboard /wp-admin2,203 ▲255.55 ▼0.1082.49 ▼31.8038.95 ▼5.60
Posts /wp-admin/edit.php2,108 ▲81.95 ▼0.0333.89 ▼2.7833.77 ▼0.23
Add New Post /wp-admin/post-new.php1,534 ▼223.52 ▲0.34637.65 ▼40.4252.02 ▼5.73
Media Library /wp-admin/upload.php1,405 ▲24.20 ▼0.0095.46 ▼4.1643.76 ▼0.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 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 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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/decorator-woocommerce-email-customizer/includes/rp-decorator-uninstall-feedback.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/decorator-woocommerce-email-customizer/includes/views/wt_custom_header.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: email designer, email templates, email customizer, woocommerce email customizer, woocommerce emails

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

"Decorator - WooCommerce Email Customizer" version 1.2.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("decorator-woocommerce-email-customizer.php" instead of "decorator.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin21,200 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP641,2072,0829,507
PO File52,6053,5257,158
CSS894742,738
JavaScript5179811,077
SVG500720

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 134)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity64.80
▷ Minimum class complexity1.00
▷ Maximum class complexity323.00
Average method complexity6.91
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods162
▷ Static methods6137.65%
▷ Public methods15293.83%
▷ Protected methods00.00%
▷ Private methods106.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants7100.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
31 PNG files occupy 0.29MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/white/instagram.png1.55KB1.44KB▼ 6.87%
assets/images/Banner.png253.97KB89.51KB▼ 64.76%
assets/images/gray/facebook.png0.77KB0.61KB▼ 19.97%
assets/images/black/vimeo.png0.95KB1.00KB0.00%
assets/images/white/facebook.png0.65KB0.62KB▼ 4.81%