62% mailchimp-for-shopified

Code Review | Mailchimp for Shopified

WordPress plugin Mailchimp for Shopified scored62%from 54 tests.

About plugin

  • Plugin page: mailchimp-for-sho...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.2.1
  • WordPress version: 6.3.1
  • First release: Jun 12, 2014
  • Latest release: Jun 18, 2014
  • Number of updates: 28
  • Update frequency: every 0.2 days
  • Top authors: telcy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /711 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.18MB] [CPU: ▼40.99ms] Passed 4 tests

A check of server-side resources used by Mailchimp for Shopified
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6713.84 ▼24.66
Dashboard /wp-admin2.83 ▼0.4716.39 ▼35.47
Posts /wp-admin/edit.php2.83 ▼0.5217.00 ▼28.91
Add New Post /wp-admin/post-new.php2.83 ▼3.0519.77 ▼74.91
Media Library /wp-admin/upload.php2.83 ▼0.3916.06 ▼16.34
Mailch. Shopified /wp-admin/options-general.php?page=mailchimp-shopified-menu2.8315.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mailchimp for Shopified
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲16014.02 ▼0.337.89 ▲5.7746.29 ▼0.61
Dashboard /wp-admin2,219 ▲314.85 ▼1.03107.48 ▼6.4041.46 ▼6.80
Posts /wp-admin/edit.php2,108 ▲222.03 ▲0.0139.35 ▲0.4841.71 ▲0.46
Add New Post /wp-admin/post-new.php1,375 ▼16720.18 ▲2.00555.05 ▼95.4963.93 ▲5.27
Media Library /wp-admin/upload.php1,398 ▲74.21 ▼0.0495.52 ▼4.2642.49 ▼2.10
Mailch. Shopified /wp-admin/options-general.php?page=mailchimp-shopified-menu8362.0226.0031.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/mailchimp-for-shopified/index.php+69
    Undefined index: newsletter
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% 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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=mailchimp-shopified-menu
    • > Notice in wp-content/plugins/mailchimp-for-shopified/index.php+69
    Undefined index: newsletter
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mailchimp-shopified-menu
    • > Warning in wp-content/plugins/mailchimp-for-shopified/index.php+77
    Use of undefined constant CUSTOMERS - assumed 'CUSTOMERS' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mailchimp-shopified-menu
    • > Warning in wp-content/plugins/mailchimp-for-shopified/index.php+77
    Use of undefined constant USERS - assumed 'USERS' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=mailchimp-shopified-menu
    • > Notice in wp-content/plugins/mailchimp-for-shopified/index.php+99
    Undefined variable: name
    • > GET request to /wp-admin/options-general.php?page=mailchimp-shopified-menu
    • > Notice in wp-content/plugins/mailchimp-for-shopified/include/MailChimp.php+31
    Undefined offset: 1

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mailchimp-for-shopified/include/checkbox.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailchimp-for-shopified/index.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/mailchimp-for-shopified/admin/admin.php:9
    • > PHP Notice
      Undefined index: newsletter in wp-content/plugins/mailchimp-for-shopified/include/ajax.php on line 6

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === mailchimp-for-shopified === )
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

mailchimp-for-shopified/index.php 92% from 13 tests

The principal PHP file in "Mailchimp for Shopified" v. 1.2 is loaded by WordPress automatically on each request
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-for-shopified.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected188 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP58162163
JavaScript119525

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions6
▷ Named functions6100.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
PNG images were not found in this plugin