78% rm-mailchimp-manager

Code Review | MailChimp Manager

WordPress plugin MailChimp Manager scored 78% from 54 tests.

About plugin

  • Plugin page: rm-mailchimp-manager
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.0
  • WordPress version: 5.9.2
  • First release: Oct 10, 2018
  • Latest release: Nov 7, 2018
  • Number of updates: 6
  • Update frequency: every 4.8 days
  • Top authors: anasbinmukim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 513 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲3.73MB] [CPU: ▼279.13ms] Passed 4 tests

Server-side resources used by MailChimp Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.40 ▲3.8877.77 ▲26.98
Dashboard /wp-admin7.42 ▲4.0155.44 ▲20.61
Posts /wp-admin/edit.php7.42 ▲3.7757.43 ▲21.88
Add New Post /wp-admin/post-new.php10.24 ▲3.27113.69 ▼1,174.40
Media Library /wp-admin/upload.php7.42 ▲4.1243.53 ▲15.40
Freemius Debug [v.2.1.3] /wp-admin/admin.php?page=freemius7.4243.17

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 247 new files
Database: no new tables, 7 new options
New WordPress options
mc_campaign_data
fs_accounts
mc_general_data
fs_gdpr
mc_api_key_data
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

MailChimp Manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,874 ▲15216.25 ▲0.656.32 ▲0.322.87 ▲0.60
Dashboard /wp-admin2,971 ▲1136.07 ▼0.15117.94 ▼15.43193.67 ▲33.81
Posts /wp-admin/edit.php2,769 ▲753.12 ▼0.1264.53 ▲2.28161.34 ▲20.04
Add New Post /wp-admin/post-new.php1,707 ▲4620.12 ▲3.49385.55 ▼27.75220.61 ▲61.24
Media Library /wp-admin/upload.php1,777 ▲795.61 ▲0.09125.95 ▼21.19233.41 ▲46.47
Freemius Debug [v.2.1.3] /wp-admin/admin.php?page=freemius1,4552.5155.04141.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • fs_debug_mode
    • mc_api_key_data
    • fs_active_plugins
    • fs_api_cache
    • fs_accounts
    • mc_general_data
    • mc_campaign_data
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/rm-mailchimp-manager/freemius/templates/ajax-loader.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/rm-mailchimp-manager/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'MCManager_API_Exception' not found in wp-content/plugins/rm-mailchimp-manager/inc/mailchimp/class-connection-exception.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MCManager_API_Exception' not found in wp-content/plugins/rm-mailchimp-manager/inc/mailchimp/class-resource-not-found-exception.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rm-mailchimp-manager/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rm-mailchimp-manager/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/rm-mailchimp-manager/template/header.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rm-mailchimp-manager/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/rm-mailchimp-manager/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/rm-mailchimp-manager/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/rm-mailchimp-manager/freemius/templates/account/partials/addon.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: mailchimp, signup, marketing, campaigns, email...

rm-mailchimp-manager/rm-mailchimp-manager.php 92% from 13 tests

"MailChimp Manager" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 191 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected47,583 lines of code in 201 files:
LanguageFilesBlank linesComment linesLines of code
PHP1256,83715,40227,958
PO File94,2164,9449,156
HTML97501,0767,077
Sass25390772,443
JavaScript671109433
Markdown1610192
CSS152410186
SVG1101138

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,254)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity60.20
▷ Minimum class complexity1.00
▷ Maximum class complexity2,254.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,236
▷ Static methods16313.19%
▷ Public methods92474.76%
▷ Protected methods151.21%
▷ Private methods29724.03%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants124
▷ Global constants10282.26%
▷ Class constants2217.74%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/rm-mailchimp-manager.png9.16KB5.26KB▼ 42.58%
img/mc.png0.57KB0.54KB▼ 5.44%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
img/tpl-logo.png16.76KB3.86KB▼ 76.99%