84% add-on-woocommerce-mailpoet

Code Review | Add-on WooCommerce - MailPoet 3

WordPress plugin Add-on WooCommerce - MailPoet 3 scored84%from 54 tests.

About plugin

  • Plugin page: add-on-woocommerc...
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2017
  • Latest release: Nov 17, 2022
  • Number of updates: 45
  • Update frequency: every 42.0 days
  • Top authors: ehsantikweb (51.11%)Kasperta (51.11%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /24,174 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Add-on WooCommerce - MailPoet 3
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.40 ▼5.21
Dashboard /wp-admin3.32 ▲0.0245.06 ▼3.80
Posts /wp-admin/edit.php3.37 ▲0.0147.45 ▲3.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.38 ▼17.90
Media Library /wp-admin/upload.php3.24 ▲0.0136.04 ▲2.08

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Add-on WooCommerce - MailPoet 3
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.21 ▼1.261.61 ▼0.2339.61 ▼4.90
Dashboard /wp-admin2,215 ▲305.79 ▲0.9396.77 ▼8.6739.39 ▼5.82
Posts /wp-admin/edit.php2,101 ▲92.05 ▲0.0539.65 ▲1.2936.94 ▲1.42
Add New Post /wp-admin/post-new.php1,550 ▲3623.31 ▲5.92603.36 ▼30.9349.28 ▼7.45
Media Library /wp-admin/upload.php1,400 ▲154.22 ▲0.0996.86 ▼10.6544.01 ▲0.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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 following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'MPWA_Helper_Function' not found in wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-place-order.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-admin-settings.php:14
    • > PHP Fatal error
      Trait 'MPWA_Helper_Function' not found in wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-frontend-fields.php on line 15
    • > PHP Fatal error
      Trait 'MPWA_Helper_Function' not found in wp-content/plugins/add-on-woocommerce-mailpoet/includes/class-mpwa-place-order-deprecated.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #3 (General plugin settings.)
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can take inspiration from this readme.txt

add-on-woocommerce-mailpoet/add-on-woocommerce-mailpoet.php Passed 13 tests

"Add-on WooCommerce - MailPoet 3" version 1.1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
85 characters long description:
Let your customers subscribe to your newsletter as they checkout with their purchase.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,325 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8190261740
PO File5259287571
JavaScript13214

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.80
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1150.00%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants2
▷ Global constants2100.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.36MB with 0.27MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png112.05KB29.42KB▼ 73.75%
assets/screenshot-1.png260.11KB71.84KB▼ 72.38%