89% woocommerce-product-subscription-mailpoet

Code Review | WooCommerce Product Subscription - MailPoet

WordPress plugin WooCommerce Product Subscription - MailPoet scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2014
  • Latest release: Jun 15, 2014
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: sabbir1991 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.52ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Product Subscription - MailPoet
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.98 ▼6.81
Dashboard /wp-admin3.33 ▲0.0343.53 ▼1.36
Posts /wp-admin/edit.php3.38 ▲0.0248.85 ▲0.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.39 ▼22.65
Media Library /wp-admin/upload.php3.25 ▲0.0234.74 ▲3.01

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Product Subscription - MailPoet
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.55 ▼0.831.95 ▲0.0937.94 ▼6.86
Dashboard /wp-admin2,206 ▲154.88 ▲0.00111.07 ▲6.7142.30 ▼3.23
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0436.63 ▲1.6430.87 ▼1.62
Add New Post /wp-admin/post-new.php1,538 ▲1823.28 ▲0.05660.19 ▲63.1852.96 ▲1.08
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0195.02 ▼2.6740.73 ▼2.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Mailing lists on product edit page)
The official readme.txt is a good inspiration

woocommerce-product-subscription-mailpoet/wc-product-mailpoet.php 92% from 13 tests

This is the main PHP file of "WooCommerce Product Subscription - MailPoet" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-product-subscription-mailpoet.php" instead of "wc-product-mailpoet.php")

Code Analysis Passed 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 plugin136 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP150122120
CSS12011
Markdown1305

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected