68% pmpro-constant-contact

Code Review | Paid Memberships Pro - Constant Contact Add On

WordPress plugin Paid Memberships Pro - Constant Contact Add On scored 68% from 53 tests.

About plugin

  • Plugin page: pmpro-constant-co...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.4.1
  • WordPress version: 5.8.1
  • First release: Feb 27, 2014
  • Latest release: Jun 10, 2020
  • Number of updates: 8
  • Update frequency: every 303.5 days
  • Top authors: strangerstudios (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

400+ active / 9,092 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.52MB] [CPU: ▼310.89ms] Passed 4 tests

An overview of server-side resources used by Paid Memberships Pro - Constant Contact Add On
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼0.739.54 ▼26.07
Dashboard /wp-admin2.13 ▼0.929.95 ▼36.81
Posts /wp-admin/edit.php2.13 ▼0.989.13 ▼35.60
Add New Post /wp-admin/post-new.php2.12 ▼3.309.82 ▼1,135.14
Media Library /wp-admin/upload.php2.13 ▼0.889.84 ▼36.01
PMPro Constant Contact /wp-admin/options-general.php?page=pmprocc_options2.1310.07

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 53 new files
Database: no new tables, 2 new options
New WordPress options
pmprocc_options
pmprocc_all_lists

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paid Memberships Pro - Constant Contact Add On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,734 ▲12815.76 ▼0.088.29 ▲0.4858.89 ▲13.84
Dashboard /wp-admin2,958 ▲1085.89 ▲0.03133.71 ▼5.69108.02 ▲0.98
Posts /wp-admin/edit.php2,760 ▲542.69 ▲0.0066.20 ▲0.2793.96 ▼4.94
Add New Post /wp-admin/post-new.php1,555 ▲7421.17 ▲2.66309.48 ▼67.39122.80 ▲15.09
Media Library /wp-admin/upload.php1,825 ▲1244.98 ▼0.01127.12 ▼34.71108.24 ▼17.32
PMPro Constant Contact /wp-admin/options-general.php?page=pmprocc_options1,1992.2155.29118.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-includes/wp-db.php+648
    Undefined property: wpdb::$pmpro_membership_levels
  • This plugin does not fully uninstall, leaving 2 options in the database
    • pmprocc_options
    • pmprocc_all_lists

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pmprocc_options
    • > Notice in wp-includes/wp-db.php+648
    Undefined property: wpdb::$pmpro_membership_levels

SRP 50% 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
The following issues need your attention
  • 35× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Components/EmailMarketing/TestSend.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Components/Contacts/EmailAddress.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Components/Activities/AddContacts.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Services/ContactService.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Services/ListService.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Components/Tracking/ForwardActivity.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Components/Tracking/OpenActivity.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Components/EmailMarketing/ClickThroughDetails.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Ctct\\Auth\\CtctDataStore' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Auth/SessionDataStore.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/pmpro-constant-contact/includes/Ctct/Components/Activities/ExportContacts.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (General settings for all members/subscribers list and unsubscribe rules.), #2 (Membership-level specific list subscription settings.)
Please take inspiration from this readme.txt

pmpro-constant-contact/pmpro-constant-contact.php Passed 13 tests

The entry point to "Paid Memberships Pro - Constant Contact Add On" version 1.0.2 is a PHP file that has certain tags in its header comment area
66 characters long description:
Sync your WordPress users and members with Constant Contact lists.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,848 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP506201,9342,848

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces11
Interfaces2
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods188
▷ Static methods2814.89%
▷ Public methods18296.81%
▷ Protected methods21.06%
▷ Private methods42.13%
Functions27
▷ Named functions2696.30%
▷ Anonymous functions13.70%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.05MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.55KB29.85KB▼ 11.02%
screenshot-2.png13.13KB10.65KB▼ 18.87%