66% mailmunch

Code Review | MailMunch - Grow your Email List

WordPress plugin MailMunch - Grow your Email List scored66%from 54 tests.

About plugin

  • Plugin page: mailmunch
  • Plugin version: 3.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 22, 2014
  • Latest release: Nov 2, 2023
  • Number of updates: 116
  • Update frequency: every 29.0 days
  • Top authors: mailmunch (100%)

Code review

54 tests

User reviews

239 reviews

Install metrics

10,000+ active /299,059 total downloads

Benchmarks

Plugin footprint 82% 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.08MB] [CPU: ▼7.90ms] 75% from 4 tests

This is a short check of server-side resources used by MailMunch - Grow your Email List
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 730.84ms on /wp-admin/post-new.php?post_type=mailmunch_page)
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.16 ▲0.10
Dashboard /wp-admin3.39 ▲0.0544.84 ▼14.68
Posts /wp-admin/edit.php3.50 ▲0.1549.42 ▲1.34
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.08 ▼18.35
Media Library /wp-admin/upload.php3.31 ▲0.0837.63 ▲4.96
Autoresponders /wp-admin/admin.php?page=mailmunch-autoresponders3.322,706.37
MailMunch /wp-admin/options-general.php?page=mailmunch3.35856.55
Settings /wp-admin/admin.php?page=mailmunch-settings3.33612.89
Forms /wp-admin/admin.php?page=mailmunch3.35889.86
Add New Page /wp-admin/post-new.php?post_type=mailmunch_page3.39730.84
Landing Pages /wp-admin/edit.php?post_type=mailmunch_page3.3738.57

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 11 new options
New WordPress options
mailmunch_activation_date
mailmunch_site_id
widget_recent-posts
mailmunch_user_token
widget_recent-comments
mailmunch_activation_redirect
theysaidso_admin_options
widget_theysaidso_widget
widget_mailmunch_widget
db_upgraded
...

Browser metrics Passed 4 tests

MailMunch - Grow your Email List: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,083 ▲32213.65 ▼0.7015.97 ▲14.2631.66 ▼11.44
Dashboard /wp-admin2,322 ▲1475.75 ▲0.0385.15 ▼19.2190.64 ▲47.37
Posts /wp-admin/edit.php2,174 ▲772.03 ▲0.0940.58 ▲4.1537.77 ▼0.39
Add New Post /wp-admin/post-new.php1,742 ▲20522.21 ▲4.00770.65 ▲150.2959.25 ▲1.57
Media Library /wp-admin/upload.php1,474 ▲744.25 ▲0.07100.98 ▼6.6577.35 ▲34.21
Autoresponders /wp-admin/admin.php?page=mailmunch-autoresponders1,9557.10292.0630.96
MailMunch /wp-admin/options-general.php?page=mailmunch2,2368.14255.8026.43
Settings /wp-admin/admin.php?page=mailmunch-settings9841.6525.9225.59
Forms /wp-admin/admin.php?page=mailmunch2,2298.01170.6226.99
Add New Page /wp-admin/post-new.php?post_type=mailmunch_page1,5752.5646.1662.35
Landing Pages /wp-admin/edit.php?post_type=mailmunch_page1,1591.9435.1930.36

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: 7 options
    • widget_mailmunch_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=mailmunch_page
    • > Notice in wp-content/plugins/mailmunch/includes/class-mailmunch-post-type.php+91
    Undefined offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=mailmunch_page
    • > Notice in wp-content/plugins/mailmunch/includes/class-mailmunch-post-type.php+91
    Trying to get property 'id' of non-object

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mailmunch/public/partials/mailmunch-public-display.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/mailmunch/admin/partials/mailmunch-admin-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/mailmunch/public/mailmunch-landing-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/mailmunch/admin/partials/mailmunch-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mailmunch/admin/partials/mailmunch-modals.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mailmunch/includes/class-mailmunch-sidebar-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mailmunch/admin/partials/mailmunch-autoresponders.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mailmunch/admin/partials/mailmunch-tabs.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=mailmunch-autoresponders
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mailmunch-autoresponders 202:34 Uncaught ReferenceError: currentUser is not defined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailmunch
    • > Console-api (warning) in unknown
    https://static.hotjar.com/c/hotjar-1291326.js?sv=7 2:6897 "Hotjar not launching due to suspicious userAgent:" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/118.0.5993.117 Safari/537.36"
    • > GET request to /wp-admin/options-general.php?page=mailmunch
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=mailmunch 204:34 Uncaught ReferenceError: currentUser is not defined
    • > GET request to /wp-admin/options-general.php?page=mailmunch
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=mailmunch 467:0 Uncaught ReferenceError: zE is not defined
    • > GET request to /wp-admin/admin.php?page=mailmunch
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mailmunch 204:34 Uncaught ReferenceError: currentUser is not defined
    • > GET request to /wp-admin/admin.php?page=mailmunch
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mailmunch 467:0 Uncaught ReferenceError: zE is not defined

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Tags: Too many tags (44 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

mailmunch/mailmunch.php 92% from 13 tests

The main PHP file in "MailMunch - Grow your Email List" ver. 3.1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,965 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP213127511,302
CSS1692455
JavaScript12728208

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods104
▷ Static methods21.92%
▷ Public methods9894.23%
▷ Protected methods00.00%
▷ Private methods65.77%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/check.png1.64KB1.53KB▼ 6.95%
admin/img/logo.png5.75KB2.58KB▼ 55.24%
admin/img/icon.png1.59KB0.92KB▼ 41.72%
admin/img/warning.png5.31KB1.95KB▼ 63.30%
admin/img/close.png0.26KB0.27KB0.00%