84% constant-contact

Code Review | constant contact

WordPress plugin constant contact scored84%from 54 tests.

About plugin

  • Plugin page: constant-contact
  • Plugin version: 10.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.6
  • WordPress version: 6.3.1
  • First release: Jun 21, 2009
  • Latest release: Aug 2, 2016
  • Number of updates: 102
  • Update frequency: every 25.5 days
  • Top authors: gopiplus (99.02%)adeelraza (1.96%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /28,395 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼9.28ms] Passed 4 tests

A check of server-side resources used by constant contact
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1038.69 ▼1.18
Dashboard /wp-admin3.40 ▲0.0547.58 ▼19.12
Posts /wp-admin/edit.php3.52 ▲0.1652.61 ▲1.83
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.86 ▼18.66
Media Library /wp-admin/upload.php3.33 ▲0.0935.65 ▲2.24
Constant contact /wp-admin/options-general.php?page=constant-contact3.2932.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 22 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for constant contact
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.33 ▼0.891.89 ▲0.2842.61 ▲2.98
Dashboard /wp-admin2,210 ▲185.84 ▲0.88103.10 ▼3.5239.60 ▲0.27
Posts /wp-admin/edit.php2,090 ▲42.03 ▼0.0941.09 ▲5.5034.67 ▼0.25
Add New Post /wp-admin/post-new.php1,531 ▼218.15 ▼5.00641.69 ▼38.2349.49 ▼3.28
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.0395.33 ▼18.6840.43 ▼7.67
Constant contact /wp-admin/options-general.php?page=constant-contact1,0182.1826.4028.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 22 options in the database
    • gcc_adminmail_content
    • gcc_password
    • gcc_usermail
    • can_compress_scripts
    • gcc_usermail_subject
    • gcc_fromemail
    • gcc_usermail_content
    • gcc_adminemail
    • gcc_title
    • gcc_button
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/constant-contact/constant-contact.php:278

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: widget, constant, constant contact, contact

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

"constant contact" version 10.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
121 characters long description:
This constant contact form plugin automatically add your subscribers email address into your constantcontact.com account.

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 plugin812 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File294102236

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin