79% campaign-monitor-dual-registration

Code Review | Campaign Monitor Dual Registration

WordPress plugin Campaign Monitor Dual Registration scored 79% from 54 tests.

About plugin

  • Plugin page: campaign-monitor-...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2014
  • Latest release: Jan 21, 2015
  • Number of updates: 17
  • Update frequency: every 17.5 days
  • Top authors: carloroosen (76.47%)pilotessa (29.41%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 1,877 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
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.48ms] Passed 4 tests

A check of server-side resources used by Campaign Monitor Dual Registration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.26 ▼0.67
Dashboard /wp-admin3.42 ▲0.1148.75 ▼4.93
Posts /wp-admin/edit.php3.53 ▲0.1846.87 ▼3.75
Add New Post /wp-admin/post-new.php6.00 ▲0.1194.95 ▲6.66
Media Library /wp-admin/upload.php3.34 ▲0.1137.98 ▼0.58
CM Dual Registration /wp-admin/options-general.php?page=cmdr_plugin3.3233.36

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 173 new files
Database: no new tables, 7 new options
New WordPress options
cmdr_settings
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Campaign Monitor Dual Registration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.27 ▼1.111.61 ▼0.5141.72 ▼7.80
Dashboard /wp-admin2,213 ▲255.86 ▲0.78108.55 ▼6.2342.62 ▼3.07
Posts /wp-admin/edit.php2,093 ▲72.00 ▼0.0133.37 ▼2.2934.62 ▼1.03
Add New Post /wp-admin/post-new.php1,545 ▲818.19 ▼5.01609.94 ▼49.2252.55 ▼7.96
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.08100.88 ▲1.6541.95 ▼3.54
CM Dual Registration /wp-admin/options-general.php?page=cmdr_plugin8472.0724.2729.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • cmdr_settings
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 83× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/get_clients.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/get_billing_details.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/list/update_custom_field.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/list/get_bounced_subscribers.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/list/create_custom_field.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/campaign/create_from_template.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/client/unsuppress.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/client/get_scheduled.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/client/get_campaigns.php
    • > /wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/authentication/auth_with_api_key.php
  • 40× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/subscriber/import.php on line 70
    • > PHP Warning
      require_once(wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/csrest_segments_test.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/all_tests.php on line 2
    • > PHP Warning
      require_once(wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/csrest_template_test.php on line 3
    • > PHP Notice
      Undefined property: stdClass::$ResultData in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/subscriber/import.php on line 68
    • > PHP Notice
      Trying to get property 'ListID' of non-object in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/list/list_webhook_receiver.php on line 22
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/samples/list/list_webhook_receiver.php on line 25
    • > PHP Warning
      require_once(wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/csrest_subscribers_test.php on line 3
    • > PHP Warning
      require_once(wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/csrest_campaigns_test.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/campaign-monitor-dual-registration/campaignmonitor-createsend-php/tests/csrest_clients_test.php on line 3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: campaign monitor, add users, user management, mailing list

campaign-monitor-dual-registration/campaign-monitor-dual-registration.php Passed 13 tests

The main PHP script in "Campaign Monitor Dual Registration" version 1.0.8 is automatically included on every request by WordPress
79 characters long description:
Automatically add new Wordpress users to your mailing list on Campaign Monitor.

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
Success! There were no dangerous files found in this plugin7,618 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141,4292,3056,274
JSON48001,013
Markdown41260325
YAML1206

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity6.07
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes916.67%
▷ Concrete classes4583.33%
▷ Final classes00.00%
Methods296
▷ Static methods41.35%
▷ Public methods296100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants37
▷ Global constants37100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin