88% mailchimp-campaign-archive

Code Review | MailChimp Campaign Archive

WordPress plugin MailChimp Campaign Archive scored 88% from 54 tests.

About plugin

  • Plugin page: mailchimp-campaig...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.5
  • WordPress version: 5.9.2
  • First release: Dec 15, 2012
  • Latest release: Dec 15, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Joe Anzalone (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

600+ active / 5,050 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼306.05ms] Passed 4 tests

Analyzing server-side resources used by MailChimp Campaign Archive
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0255.96 ▲3.20
Dashboard /wp-admin3.43 ▲0.0232.70 ▼34.28
Posts /wp-admin/edit.php3.66 ▲0.0238.09 ▼0.77
Add New Post /wp-admin/post-new.php6.90 ▼0.0895.03 ▼1,190.01
Media Library /wp-admin/upload.php3.31 ▲0.0126.06 ▲0.88

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for MailChimp Campaign Archive
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5115.88 ▲0.246.59 ▲0.592.99 ▲0.89
Dashboard /wp-admin2,892 ▲316.15 ▼0.02132.84 ▼15.24171.01 ▲14.35
Posts /wp-admin/edit.php2,688 ▼63.24 ▲0.0263.13 ▼37.56140.79 ▼17.77
Add New Post /wp-admin/post-new.php1,661 ▼1121.13 ▲0.41418.21 ▼27.65182.38 ▲18.28
Media Library /wp-admin/upload.php1,698 ▼05.49 ▲0.01146.65 ▲6.61219.94 ▲33.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 34× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_folders.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignBounceMessages.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignSchedule.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignSendNow.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_templates.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignEmailStatsAIMAll.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignCreate.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_apikeyExpire.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignReplicate.php
    • > /wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignAnalytics.php
  • 138× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      unserialize(): Error at offset 0 of 175 bytes in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/inc/MCAPI.class.php on line 143
    • > PHP Warning
      Illegal string offset 'msg' in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignAdvice.php on line 24
    • > PHP Notice
      Undefined variable: username in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_apikeyAdd.php on line 11
    • > PHP Warning
      sizeof(): Parameter must be an array or an object that implements Countable in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_lists.php on line 19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignAnalytics.php on line 21
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignAbuseReports.php on line 21
    • > PHP Warning
      Illegal string offset 'opens' in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignEmailDomainPerformance.php on line 25
    • > PHP Notice
      unserialize(): Error at offset 0 of 175 bytes in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/inc/MCAPI.class.php on line 143
    • > PHP Notice
      Array to string conversion in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaignCreate.php on line 43
    • > PHP Warning
      sizeof(): Parameter must be an array or an object that implements Countable in wp-content/plugins/mailchimp-campaign-archive/mailchimp-api-mini-class/examples/mcapi_campaigns.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Paste the shortcode into a post or page. The API key is the only required parameter.), #2 (A list of sent emails is generated, complete with links to view the HTML version of each one.)
Please take inspiration from this readme.txt

mailchimp-campaign-archive/main.php 92% from 13 tests

Analyzing the main PHP file in "MailChimp Campaign Archive" version 1.0.3
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mailchimp-campaign-archive.php" instead of "main.php")

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
Good job! No executable or dangerous file extensions detected936 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP37205204936

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity19.00
▷ Minimum class complexity13.00
▷ Maximum class complexity22.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png61.17KB16.36KB▼ 73.26%
screenshot-1.png51.78KB17.31KB▼ 66.56%