78% mailchimp-as-a-registration

Code Review | Mailchimp as a Registration

WordPress plugin Mailchimp as a Registration scored78%from 54 tests.

About plugin

  • Plugin page: mailchimp-as-a-re...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.5
  • WordPress version: 6.3.1
  • First release: Oct 30, 2013
  • Latest release: Aug 23, 2020
  • Number of updates: 7
  • Update frequency: every 355.6 days
  • Top authors: phkcorp2005 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.93ms] Passed 4 tests

Analyzing server-side resources used by Mailchimp as a Registration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0135.31 ▼7.66
Dashboard /wp-admin3.31 ▲0.0146.15 ▼0.37
Posts /wp-admin/edit.php3.36 ▲0.0050.98 ▲1.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.11 ▼25.31
Media Library /wp-admin/upload.php3.23 ▲0.0036.42 ▲1.64
Mailchimp As A Registration /wp-admin/options-general.php?page=mailchimp_admin3.1733.10

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

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

Browser metrics Passed 4 tests

Mailchimp as a Registration: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.18 ▼1.571.63 ▼0.5640.71 ▼11.28
Dashboard /wp-admin2,210 ▲224.87 ▼0.02108.28 ▲1.0840.21 ▼5.52
Posts /wp-admin/edit.php2,096 ▲42.04 ▲0.0339.18 ▼2.1635.50 ▲1.38
Add New Post /wp-admin/post-new.php1,542 ▲923.21 ▼0.12675.26 ▲76.5956.62 ▲9.56
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0194.58 ▼0.2442.79 ▲0.45
Mailchimp As A Registration /wp-admin/options-general.php?page=mailchimp_admin1,3245.78117.0477.00

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 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=mailchimp_admin
    • > Notice in wp-content/plugins/mailchimp-as-a-registration/mailchimpaar.php+34
    Undefined offset: 1
    • > GET request to /wp-admin/options-general.php?page=mailchimp_admin
    • > Notice in wp-content/plugins/mailchimp-as-a-registration/mailchimpaar.php+328
    Undefined variable: lists
    • > GET request to /wp-admin/options-general.php?page=mailchimp_admin
    • > Notice in wp-content/plugins/mailchimp-as-a-registration/mailchimpaar.php+344
    Undefined variable: campaigns

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mailchimp-as-a-registration/mailchimpaar.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: Please take inspiration from this readme.txt

mailchimp-as-a-registration/mailchimpaar.php 85% from 13 tests

The principal PHP file in "Mailchimp as a Registration" v. 1.1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mailchimp-as-a-registration.php" instead of "mailchimpaar.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 223 characters long)

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
Good job! No executable or dangerous file extensions detected295 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15533276
Markdown113019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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