73% mailchimp-for-wp

Code Review | MC4WP: Mailchimp for WordPress

WordPress plugin MC4WP: Mailchimp for WordPress scored73%from 54 tests.

About plugin

  • Plugin page: mailchimp-for-wp
  • Plugin version: 4.9.10
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 19, 2013
  • Latest release: Nov 20, 2023
  • Number of updates: 555
  • Update frequency: every 6.9 days
  • Top authors: DvanKooten (100%)

Code review

54 tests

User reviews

1447 reviews

Install metrics

2,000,000+ active /51,406,099 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.17MB] [CPU: ▼6.34ms] Passed 4 tests

This is a short check of server-side resources used by MC4WP: Mailchimp for WordPress
This plugin does not affect your website's performance
Page Memory (MB) CPU Time (ms)
Home / 3.59 ▲0.13 37.11 ▼5.08
Dashboard /wp-admin 3.54 ▲0.19 48.06 ▼14.47
Posts /wp-admin/edit.php 3.59 ▲0.23 50.63 ▲7.25
Add New Post /wp-admin/post-new.php 6.06 ▲0.18 83.71 ▼13.05
Media Library /wp-admin/upload.php 3.40 ▲0.17 43.38 ▲11.58
Add-ons /wp-admin/admin.php?page=mailchimp-for-wp-extensions 3.40 38.51
Other /wp-admin/admin.php?page=mailchimp-for-wp-other 3.44 38.21
Integrations /wp-admin/admin.php?page=mailchimp-for-wp-integrations 3.47 37.47
Mailchimp /wp-admin/admin.php?page=mailchimp-for-wp 3.42 33.23
Form /wp-admin/admin.php?page=mailchimp-for-wp-forms 3.45 27.28

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 156 new files
Database: no new tables, 9 new options
New WordPress options
mc4wp_version
can_compress_scripts
widget_mc4wp_form_widget
mc4wp
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for MC4WP: Mailchimp for WordPress
Normal browser usage
Page Nodes Memory (MB) Script (ms) Layout (ms)
Home / 2,852 ▲90 14.39 ▲0.05 1.65 ▼0.21 41.20 ▼1.74
Dashboard /wp-admin 2,251 ▲74 5.64 ▲0.03 90.84 ▼9.89 40.51 ▼4.60
Posts /wp-admin/edit.php 2,163 ▲63 1.98 ▼0.02 40.36 ▲1.95 37.30 ▲1.13
Add New Post /wp-admin/post-new.php 1,686 ▲160 20.13 ▼3.49 784.75 ▲106.20 59.54 ▲3.57
Media Library /wp-admin/upload.php 1,462 ▲62 4.18 ▲0.01 106.24 ▲10.04 47.45 ▲6.40
Add-ons /wp-admin/admin.php?page=mailchimp-for-wp-extensions 1,002 1.84 30.50 43.45
Other /wp-admin/admin.php?page=mailchimp-for-wp-other 1,104 1.97 30.20 34.46
Integrations /wp-admin/admin.php?page=mailchimp-for-wp-integrations 1,285 1.85 26.55 30.64
Mailchimp /wp-admin/admin.php?page=mailchimp-for-wp 1,028 1.83 23.17 28.17
Form /wp-admin/admin.php?page=mailchimp-for-wp-forms 1,033 1.85 25.07 32.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • can_compress_scripts
    • mc4wp
    • widget_theysaidso_widget
    • widget_mc4wp_form_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • mc4wp_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mailchimp-for-wp-other
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mailchimp-for-wp/includes/views/parts/lists-overview-details.php
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/mailchimp-for-wp/includes/views/parts/lists-overview-details.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc4wp_register_integration() in wp-content/plugins/mailchimp-for-wp/integrations/wpforms/bootstrap.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc4wp_register_integration() in wp-content/plugins/mailchimp-for-wp/integrations/ninja-forms/bootstrap.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MC4WP_API_Exception' not found in wp-content/plugins/mailchimp-for-wp/includes/api/class-connection-exception.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GF_Field' not found in wp-content/plugins/mailchimp-for-wp/integrations/gravity-forms/class-field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mailchimp-for-wp/integrations/wpforms/admin-before.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MC4WP_Dynamic_Content_Tags' not found in wp-content/plugins/mailchimp-for-wp/includes/forms/class-form-tags.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/mailchimp-for-wp/includes/admin/migrations/4.6.0-remove-lists-from-options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailchimp-for-wp/integrations/bootstrap.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/mailchimp-for-wp/includes/forms/views/tabs/form-appearance.php:3

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

mailchimp-for-wp/mailchimp-for-wp.php Passed 13 tests

The main PHP file in "MC4WP: Mailchimp for WordPress" ver. 4.9.10 adds more information about the plugin and also serves as the entry point for this plugin
97 characters long description:
Mailchimp for WordPress by ibericode. Adds various highly effective sign-up methods to your site.

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
No dangerous file extensions were detected9,730 lines of code in 150 files:
Language Files Blank lines Comment lines Lines of code
PHP 131 2,413 5,426 8,613
Markdown 1 696 0 941
SVG 3 1 1 95
XML 1 2 0 44
JavaScript 10 1 2 33
CSS 4 0 0 4

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code 0.30
Average class complexity 11.93
▷ Minimum class complexity 1.00
▷ Maximum class complexity 51.00
Average method complexity 2.33
▷ Minimum method complexity 1.00
▷ Maximum method complexity 19.00
Code structure
Namespaces 2
Interfaces 0
Traits 0
Classes 67
▷ Abstract classes 3 4.48%
▷ Concrete classes 64 95.52%
▷ Final classes 1 1.56%
Methods 550
▷ Static methods 24 4.36%
▷ Public methods 480 87.27%
▷ Protected methods 43 7.82%
▷ Private methods 27 4.91%
Functions 55
▷ Named functions 48 87.27%
▷ Anonymous functions 7 12.73%
Constants 10
▷ Global constants 4 40.00%
▷ Class constants 6 60.00%
▷ Public constants 6 100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin