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
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.11 ▼5.08
Dashboard /wp-admin3.54 ▲0.1948.06 ▼14.47
Posts /wp-admin/edit.php3.59 ▲0.2350.63 ▲7.25
Add New Post /wp-admin/post-new.php6.06 ▲0.1883.71 ▼13.05
Media Library /wp-admin/upload.php3.40 ▲0.1743.38 ▲11.58
Add-ons /wp-admin/admin.php?page=mailchimp-for-wp-extensions3.4038.51
Other /wp-admin/admin.php?page=mailchimp-for-wp-other3.4438.21
Integrations /wp-admin/admin.php?page=mailchimp-for-wp-integrations3.4737.47
Mailchimp /wp-admin/admin.php?page=mailchimp-for-wp3.4233.23
Form /wp-admin/admin.php?page=mailchimp-for-wp-forms3.4527.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
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9014.39 ▲0.051.65 ▼0.2141.20 ▼1.74
Dashboard /wp-admin2,251 ▲745.64 ▲0.0390.84 ▼9.8940.51 ▼4.60
Posts /wp-admin/edit.php2,163 ▲631.98 ▼0.0240.36 ▲1.9537.30 ▲1.13
Add New Post /wp-admin/post-new.php1,686 ▲16020.13 ▼3.49784.75 ▲106.2059.54 ▲3.57
Media Library /wp-admin/upload.php1,462 ▲624.18 ▲0.01106.24 ▲10.0447.45 ▲6.40
Add-ons /wp-admin/admin.php?page=mailchimp-for-wp-extensions1,0021.8430.5043.45
Other /wp-admin/admin.php?page=mailchimp-for-wp-other1,1041.9730.2034.46
Integrations /wp-admin/admin.php?page=mailchimp-for-wp-integrations1,2851.8526.5530.64
Mailchimp /wp-admin/admin.php?page=mailchimp-for-wp1,0281.8323.1728.17
Form /wp-admin/admin.php?page=mailchimp-for-wp-forms1,0331.8525.0732.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:
LanguageFilesBlank linesComment linesLines of code
PHP1312,4135,4268,613
Markdown16960941
SVG31195
XML12044
JavaScript101233
CSS4004

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 code0.30
Average class complexity11.93
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes67
▷ Abstract classes34.48%
▷ Concrete classes6495.52%
▷ Final classes11.56%
Methods550
▷ Static methods244.36%
▷ Public methods48087.27%
▷ Protected methods437.82%
▷ Private methods274.91%
Functions55
▷ Named functions4887.27%
▷ Anonymous functions712.73%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.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