84% wc-mailup

Code Review | MailUp for WooCommerce

WordPress plugin MailUp for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-mailup
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 31, 2021
  • Latest release: Sep 20, 2023
  • Number of updates: 18
  • Update frequency: every 43.4 days
  • Top authors: ghera74 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,032 total downloads


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

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.22ms] Passed 4 tests

Server-side resources used by MailUp for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.11 ▼1.33
Dashboard /wp-admin3.43 ▲0.1348.17 ▼8.00
Posts /wp-admin/edit.php3.55 ▲0.1947.60 ▲0.39
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.67 ▼7.93
Media Library /wp-admin/upload.php3.36 ▲0.1339.11 ▲1.00

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by MailUp for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.60 ▼0.759.75 ▲8.2440.86 ▲0.77
Dashboard /wp-admin2,212 ▲315.59 ▲0.0180.14 ▼20.7637.29 ▼2.99
Posts /wp-admin/edit.php2,111 ▲112.01 ▲0.0534.14 ▼0.8533.38 ▼2.09
Add New Post /wp-admin/post-new.php1,547 ▲1918.14 ▼4.96645.40 ▼18.8157.95 ▲6.44
Media Library /wp-admin/upload.php1,414 ▲144.15 ▼0.0795.93 ▼0.2744.73 ▲0.50

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-mailup/admin/ilghera-notice/class-ilghera-notice.php:214
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-mailup/admin/mufwc-admin-subscription-template.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wc-mailup/includes/mufwc-meta-box-template.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Ilghera_Notice' not found in wp-content/plugins/wc-mailup/admin/ilghera-notice/extension.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-mailup/includes/class-mufwc-button.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-mailup/includes/class-mufwc-edit-post.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-mailup/mailup-for-wc.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-mailup/includes/class-mufwc-auto-subscription.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-mailup/admin/mufwc-admin-general-template.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-mailup/includes/mufwc-meta-box-product-template.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Options related to the newsletter flag in the WordPress registration form), #2 (Subscription button general options), #3 (Subscription button specific options), #4 (Single WooCommerce product settings)
The official readme.txt is a good inspiration

wc-mailup/mailup-for-wc.php 92% from 13 tests

The main PHP script in "MailUp for WooCommerce" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-mailup.php" instead of "mailup-for-wc.php")

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
There were no executable files found in this plugin12,420 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PO File17296172

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity18.80
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
▷ Static methods2027.78%
▷ Public methods6894.44%
▷ Protected methods00.00%
▷ Private methods45.56%
▷ Named functions133.33%
▷ Anonymous functions266.67%
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/tzCheckbox/img/line_bg.png0.26KB0.23KB▼ 9.16%
admin/ilghera-notice/images/ilGhera-icon-40px.png10.48KB1.70KB▼ 83.74%
js/tzCheckbox/jquery.tzCheckbox/background-small.png3.88KB2.22KB▼ 42.84%