94% add-on-woocommerce-mailpoet

Code Review | Add-on WooCommerce - MailPoet 3

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

About plugin

  • Plugin page: add-on-woocommerc...
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5.1
  • WordPress version: 5.9.2
  • First release: Sep 14, 2017
  • Latest release: Sep 29, 2020
  • Number of updates: 44
  • Update frequency: every 25.3 days
  • Top authors: Kasperta (52.27%)ehsantikweb (50%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active / 18,535 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
Install script ran successfully

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

A check of server-side resources used by Add-on WooCommerce - MailPoet 3
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0258.45 ▲6.43
Dashboard /wp-admin3.42 ▲0.0132.51 ▼2.72
Posts /wp-admin/edit.php3.66 ▲0.0138.52 ▲0.33
Add New Post /wp-admin/post-new.php6.89 ▼0.0894.19 ▼1,158.10
Media Library /wp-admin/upload.php3.31 ▲0.0127.77 ▲2.32

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, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Add-on WooCommerce - MailPoet 3
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲7215.65 ▼0.036.23 ▲0.242.35 ▲0.18
Dashboard /wp-admin2,912 ▲546.15 ▼0.01114.16 ▼23.93154.29 ▼8.89
Posts /wp-admin/edit.php2,708 ▲173.24 ▼0.0061.92 ▼1.89135.72 ▼5.20
Add New Post /wp-admin/post-new.php1,764 ▼921.69 ▲0.23425.95 ▼40.33160.98 ▲2.53
Media Library /wp-admin/upload.php1,721 ▲235.48 ▼0.07137.39 ▼4.66184.02 ▼2.12

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
Uninstaller ran successfully

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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:13
    • > 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 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 13
    • > 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 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #3 (General plugin settings.)
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

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

"Add-on WooCommerce - MailPoet 3" version 1.1.8'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 a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,307 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8201250722
PO File5259287571
JavaScript13214

PHP code Passed 2 tests

This is a short overview 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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%