89% mailpoet-wp-e-commerce-add-on

Code Review | MailPoet WP e-Commerce Add-on

WordPress plugin MailPoet WP e-Commerce Add-on scored89%from 54 tests.

About plugin

  • Plugin page: mailpoet-wp-e-com...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2014
  • Latest release: Mar 24, 2014
  • Number of updates: 4
  • Update frequency: every 19.3 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by MailPoet WP e-Commerce Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.12 ▼5.05
Dashboard /wp-admin3.31 ▲0.0043.09 ▼12.42
Posts /wp-admin/edit.php3.36 ▲0.0049.90 ▼2.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.31 ▼26.04
Media Library /wp-admin/upload.php3.23 ▲0.0037.98 ▲1.68

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for MailPoet WP e-Commerce Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.19 ▼1.171.72 ▼0.9945.63 ▲3.18
Dashboard /wp-admin2,221 ▲184.89 ▼0.97114.23 ▼10.9246.40 ▲0.69
Posts /wp-admin/edit.php2,097 ▼61.97 ▼0.0836.90 ▼7.7032.75 ▼6.34
Add New Post /wp-admin/post-new.php1,548 ▲323.13 ▲1.84629.59 ▼87.0255.33 ▼7.70
Media Library /wp-admin/upload.php1,400 ▲34.24 ▲0.01112.55 ▲2.3948.15 ▼2.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Subscribe checkbox field on checkout page.), #2 (WP e-Commerce MailPoet Settings.)
You can look at the official readme.txt

mailpoet-wp-e-commerce-add-on/mailpoet-wp-ecommerce-addon.php 85% from 13 tests

The main PHP file in "MailPoet WP e-Commerce Add-on" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.5.1" instead of "3.7.1")
  • Main file name: The principal plugin file should be the same as the plugin slug ("mailpoet-wp-e-commerce-add-on.php" instead of "mailpoet-wp-ecommerce-addon.php")

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
Success! There were no dangerous files found in this plugin513 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PO File68298297
PHP25875216

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png30.59KB19.16KB▼ 37.37%
screenshot-1.png77.25KB32.01KB▼ 58.56%