66% constant-contact-forms-by-mailmunch

Code Review | Constant Contact Forms by MailMunch

WordPress plugin Constant Contact Forms by MailMunch scored 66% from 54 tests.

About plugin

  • Plugin page: constant-contact-...
  • Plugin version: 2.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 5.8.1
  • First release: Dec 9, 2014
  • Latest release: Oct 8, 2021
  • Number of updates: 56
  • Update frequency: every 44.5 days
  • Top authors: mailmunch (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

7,000+ active / 91,029 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼144.19ms] 75% from 4 tests

Server-side resources used by Constant Contact Forms by MailMunch
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 664.80ms on /wp-admin/post-new.php?post_type=mailmunch_page)
PageMemory (MB)CPU Time (ms)
Home /3.11 ▲0.2835.07 ▲0.41
Dashboard /wp-admin3.43 ▲0.3851.13 ▲6.55
Posts /wp-admin/edit.php3.48 ▲0.3752.82 ▲6.52
Add New Post /wp-admin/post-new.php5.73 ▲0.2994.79 ▼584.76
Media Library /wp-admin/upload.php3.31 ▲0.3139.84 ▲1.08
Autoresponders /wp-admin/admin.php?page=constantcontact-mailmunch-autoresponders3.313,578.74
Landing Pages /wp-admin/edit.php?post_type=mailmunch_page3.4238.50
Constant Contact /wp-admin/options-general.php?page=constantcontact-mailmunch3.292,361.05
Settings /wp-admin/admin.php?page=constantcontact-mailmunch-settings3.292,333.24
Forms /wp-admin/admin.php?page=constantcontact-mailmunch3.292,348.23
Add New Page /wp-admin/post-new.php?post_type=mailmunch_page3.45664.80

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 95 new files
Database: no new tables, 5 new options
New WordPress options
cc_mm_user_token
widget_cc_mm_widget
cc_mm_activation_date
cc_mm_activation_redirect
cc_mm_site_id

Browser metrics Passed 4 tests

An overview of browser requirements for Constant Contact Forms by MailMunch
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,000 ▲40416.42 ▲0.8123.35 ▲12.4945.81 ▼2.73
Dashboard /wp-admin3,113 ▲1796.15 ▲0.05146.76 ▲3.51141.47 ▲31.49
Posts /wp-admin/edit.php2,841 ▲1022.74 ▲0.0373.76 ▲5.1087.95 ▼9.50
Add New Post /wp-admin/post-new.php1,673 ▼1021.46 ▲2.73340.06 ▼28.21104.37 ▼3.97
Media Library /wp-admin/upload.php1,835 ▲135.07 ▲0.04142.31 ▼39.91132.60 ▼3.54
Autoresponders /wp-admin/admin.php?page=constantcontact-mailmunch-autoresponders1,3443.1592.2078.04
Landing Pages /wp-admin/edit.php?post_type=mailmunch_page1,5352.6462.8079.39
Constant Contact /wp-admin/options-general.php?page=constantcontact-mailmunch1,4872.1163.0672.19
Settings /wp-admin/admin.php?page=constantcontact-mailmunch-settings1,2792.2456.3684.37
Forms /wp-admin/admin.php?page=constantcontact-mailmunch1,4902.1160.6272.82
Add New Page /wp-admin/post-new.php?post_type=mailmunch_page2,1273.3690.91100.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_cc_mm_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=mailmunch_page
    • > Notice in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/class-constantcontact-mailmunch-post-type.php+91
    Undefined offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=mailmunch_page
    • > Notice in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/class-constantcontact-mailmunch-post-type.php+91
    Trying to get property 'id' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/constant-contact-forms-by-mailmunch/public/partials/constantcontact-mailmunch-public-display.php
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/class-constantcontact-mailmunch-sidebar-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/Ctct/Components/Library/Thumbnail.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/constant-contact-forms-by-mailmunch/admin/partials/constantcontact-mailmunch-integrate.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/Ctct/Components/Account/VerifiedEmailAddress.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/Ctct/Services/ContactService.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/constant-contact-forms-by-mailmunch/public/constantcontact-mailmunch-landing-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/Ctct/Components/Activities/AddContactsImportData.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/Ctct/Components/Activities/ExportContacts.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/Ctct/Components/Tracking/ForwardActivity.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/constant-contact-forms-by-mailmunch/includes/Ctct/Components/Account/AccountInfo.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=constantcontact-mailmunch-autoresponders
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=constantcontact-mailmunch-autoresponders 198:34 Uncaught ReferenceError: currentUser is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: constant contact widget, constant contact subscribe, constant contact signup form, constant contact newsletter, constantcontact...

constant-contact-forms-by-mailmunch/constantcontact-mailmunch.php 77% from 13 tests

The principal PHP file in "Constant Contact Forms by MailMunch" v. 2.0.10 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 181 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("constant-contact-forms-by-mailmunch.php" instead of "constantcontact-mailmunch.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin4,725 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP799452,9344,025
CSS1732468
JavaScript12828232

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.41
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces13
Interfaces2
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes00.00%
Methods327
▷ Static methods3510.70%
▷ Public methods31496.02%
▷ Protected methods20.61%
▷ Private methods113.36%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
6 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/warning.png5.31KB1.95KB▼ 63.30%
admin/img/check.png1.64KB1.53KB▼ 6.95%
admin/img/smallcheck.png0.85KB0.79KB▼ 7.47%
admin/img/icon.png0.83KB0.96KB0.00%
admin/img/constantcontact_logo.png9.06KB4.03KB▼ 55.56%