83% connect-contact-form-7-to-constant-contact-v3

Code Review | Connect Contact Form 7 to Constant Contact

WordPress plugin Connect Contact Form 7 to Constant Contact scored83%from 54 tests.

About plugin

  • Plugin page: connect-contact-f...
  • Plugin version: 1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Oct 27, 2019
  • Latest release: Mar 24, 2022
  • Number of updates: 41
  • Update frequency: every 21.5 days
  • Top authors: thehowarde (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.36MB] [CPU: ▲1.89ms] Passed 4 tests

Analyzing server-side resources used by Connect Contact Form 7 to Constant Contact
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4148.32 ▲10.30
Dashboard /wp-admin3.71 ▲0.4071.56 ▲23.29
Posts /wp-admin/edit.php3.74 ▲0.3948.05 ▲0.08
Add New Post /wp-admin/post-new.php6.23 ▲0.3484.14 ▼10.66
Media Library /wp-admin/upload.php3.55 ▲0.3239.66 ▲7.83
CTCT Extra Settings /wp-admin/options-general.php?page=dd-ctct-extra3.5232.80
Constant Contact /wp-admin/admin.php?page=dd_ctct3.5232.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Connect Contact Form 7 to Constant Contact
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.47 ▼0.921.82 ▲0.1542.86 ▲2.41
Dashboard /wp-admin2,227 ▲395.04 ▲0.10110.02 ▲5.2339.60 ▼5.97
Posts /wp-admin/edit.php2,109 ▲172.44 ▲0.4235.48 ▼5.2533.02 ▼3.66
Add New Post /wp-admin/post-new.php1,537 ▲823.56 ▲5.27663.81 ▲47.5454.79 ▼2.60
Media Library /wp-admin/upload.php1,409 ▲214.43 ▲0.2597.80 ▲4.8740.24 ▼1.52
CTCT Extra Settings /wp-admin/options-general.php?page=dd-ctct-extra8241.8027.6625.79
Constant Contact /wp-admin/admin.php?page=dd_ctct8491.9925.3625.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'YeEasyAdminNotices\\V1\oticeTestCase' not found in wp-content/plugins/connect-contact-form-7-to-constant-contact-v3/admin/admin-notices/tests/test-notices.php:5
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/connect-contact-form-7-to-constant-contact-v3/admin/admin-notices/tests/bootstrap.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/connect-contact-form-7-to-constant-contact-v3/admin/admin-notices/tests/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/connect-contact-form-7-to-constant-contact-v3/admin/admin-notices/tests/NoticeTestCase.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function YeEasyAdminNotices\\V1\\add_action() in wp-content/plugins/connect-contact-form-7-to-constant-contact-v3/admin/admin-notices/AdminNotice.php:604

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Choose the list or lists you want to assign contacts to.), #2 (This checkbox tells the plugin if you're using the shortcode from the form or whether you're using an automatic opt-in without a checkbox.), #3 (Potential Front end usage.)
  • Screenshots: Please add descriptions for these screenshots #0, #0, #0 in connect-contact-form-7-to-constant-contact-v3/assets to your readme.txt
The official readme.txt is a good inspiration

connect-contact-form-7-to-constant-contact-v3/dd-cf7-constant-contact-v3.php 77% from 13 tests

The primary PHP file in "Connect Contact Form 7 to Constant Contact" version 1.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("connect-contact-form-7-to-constant-contact-v3.php" instead of "dd-cf7-constant-contact-v3.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,584 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP194928502,062
Markdown21010227
Bourne Shell121899
CSS27089
JavaScript41352
YAML17023
JSON10018
XML10014

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.28
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods145
▷ Static methods128.28%
▷ Public methods11982.07%
▷ Protected methods149.66%
▷ Private methods128.28%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants12
▷ Global constants18.33%
▷ Class constants1191.67%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
admin/img/CTCT_horizontal_logo.png5.89KB3.50KB▼ 40.48%
admin/img/ctct-favicon.png3.01KB1.73KB▼ 42.60%