84% constant-contact-woocommerce

Code Review | Constant Contact + WooCommerce

WordPress plugin Constant Contact + WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: constant-contact-...
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2019
  • Latest release: Oct 25, 2023
  • Number of updates: 34
  • Update frequency: every 46.7 days
  • Top authors: constantcontact (85.29%)ggwicz (17.65%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /39,998 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.21ms] Passed 4 tests

An overview of server-side resources used by Constant Contact + WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.74 ▼1.68
Dashboard /wp-admin3.31 ▲0.0047.55 ▼7.00
Posts /wp-admin/edit.php3.36 ▲0.0045.79 ▲3.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.61 ▼19.69
Media Library /wp-admin/upload.php3.23 ▲0.0037.52 ▲3.94

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 171 new files
Database: 1 new table, 7 new options
New tables
wp_cc_abandoned_checkouts
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
cc_abandoned_checkouts_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Constant Contact + WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.73 ▲0.1142.11 ▼4.73
Dashboard /wp-admin2,198 ▲215.61 ▼0.0686.42 ▼7.3643.12 ▼1.00
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0233.24 ▼30.7135.15 ▼4.02
Add New Post /wp-admin/post-new.php1,526 ▼923.58 ▲5.46670.07 ▲1.6952.46 ▼22.94
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0499.46 ▼4.1644.66 ▲1.40

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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
  • 119× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/constant-contact-woocommerce/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/constant-contact-woocommerce/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/constant-contact-woocommerce/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/constant-contact-woocommerce/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'WebDevStudios\\OopsWP\\Utility\\Hookable' not found in wp-content/plugins/constant-contact-woocommerce/src/View/Checkout/NewsletterPreferenceCheckbox.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'WebDevStudios\\OopsWP\\Utility\\Registerable' not found in wp-content/plugins/constant-contact-woocommerce/vendor/webdevstudios/oops-wp/src/Structure/Editor/EditorBlock.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/constant-contact-woocommerce/src/View/Admin/WooTab.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WebDevStudios\\CCForWoo\\View\\Admin\oticeAbstract' not found in wp-content/plugins/constant-contact-woocommerce/src/View/Admin/Notice.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'WebDevStudios\\OopsWP\\Utility\\Hookable' not found in wp-content/plugins/constant-contact-woocommerce/src/View/Checkout/CampaignId.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/constant-contact-woocommerce/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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: marketing automation, email marketing, abandoned cart, woocommerce, ecommerce...

constant-contact-woocommerce/plugin.php 85% from 13 tests

The entry point to "Constant Contact + WooCommerce" version 2.2.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("constant-contact-woocommerce.php" instead of "plugin.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.2.2" instead of "3.6.0")

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
Good job! No executable or dangerous file extensions detected5,186 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
PHP1481,0013,2114,573
JSON400353
CSS1351157
JavaScript6167771
Markdown26032

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.25
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces21
Interfaces5
Traits2
Classes132
▷ Abstract classes86.06%
▷ Concrete classes12493.94%
▷ Final classes10.81%
Methods313
▷ Static methods165.11%
▷ Public methods21368.05%
▷ Protected methods4414.06%
▷ Private methods5617.89%
Functions10
▷ Named functions330.00%
▷ Anonymous functions770.00%
Constants27
▷ Global constants00.00%
▷ Class constants27100.00%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/assets/ctct.png4.21KB1.90KB▼ 54.96%
src/assets/ctct-connected.png2.50KB1.07KB▼ 57.35%