84% mailpoet-woocommerce-add-on

Code Review | MailPoet Checkout Subscription for WooCommerce (Legacy)

WordPress plugin MailPoet Checkout Subscription for WooCommerce (Legacy) scored84%from 54 tests.

About plugin

  • Plugin page: mailpoet-woocomme...
  • Plugin version: 4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Dec 20, 2013
  • Latest release: Nov 25, 2017
  • Number of updates: 31
  • Update frequency: every 46.4 days
  • Top authors: sebd86 (96.77%)wysija (6.45%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active /54,982 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.48ms] Passed 4 tests

This is a short check of server-side resources used by MailPoet Checkout Subscription for WooCommerce (Legacy)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.91 ▼1.09
Dashboard /wp-admin3.31 ▲0.0043.91 ▼5.88
Posts /wp-admin/edit.php3.36 ▲0.0047.19 ▲1.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.70 ▼19.58
Media Library /wp-admin/upload.php3.23 ▲0.0035.83 ▲0.63

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

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

Browser metrics Passed 4 tests

MailPoet Checkout Subscription for WooCommerce (Legacy): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.201.77 ▲0.0343.80 ▲1.92
Dashboard /wp-admin2,209 ▲215.88 ▼0.0095.89 ▼19.6037.99 ▼8.57
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0140.20 ▲0.0435.07 ▲1.34
Add New Post /wp-admin/post-new.php1,533 ▼023.24 ▲0.07669.90 ▲41.6955.68 ▼0.69
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0694.68 ▼1.1444.38 ▲2.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mailpoet-woocommerce-add-on/woo-dependencies/class-wc-dependencies.php:13

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 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

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

Analyzing the main PHP file in "MailPoet Checkout Subscription for WooCommerce (Legacy)" version 4.0.1
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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected613 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10181458580
JavaScript27533

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity6.60
▷ Minimum class complexity3.00
▷ Maximum class complexity14.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1033.33%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
No PNG files were detected