84% constant-contact-form

Code Review | constant contact form

WordPress plugin constant contact form scored84%from 54 tests.

About plugin

  • Plugin page: constant-contact-...
  • Plugin version: 7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.8
  • WordPress version: 6.3.1
  • First release: Sep 9, 2011
  • Latest release: Jun 12, 2017
  • Number of updates: 35
  • Update frequency: every 60.1 days
  • Top authors: gopiplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /9,928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.24ms] Passed 4 tests

Analyzing server-side resources used by constant contact form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.58 ▲1.13
Dashboard /wp-admin3.40 ▲0.1050.32 ▼3.34
Posts /wp-admin/edit.php3.51 ▲0.1647.20 ▼2.60
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.68 ▼20.13
Media Library /wp-admin/upload.php3.32 ▲0.0936.94 ▲1.17
Constant contact form /wp-admin/options-general.php?page=constant-contact-form3.2933.60

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 22 new options
New WordPress options
db_upgraded
ccf_adminmail_subject
ccf_button
ccf_usermail
ccf_usermail_content
theysaidso_admin_options
ccf_adminmail_content
ccf_group
ccf_username
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for constant contact form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.69 ▲0.201.91 ▲0.1845.41 ▲4.94
Dashboard /wp-admin2,202 ▲225.61 ▼0.0493.75 ▲3.7542.54 ▼3.62
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0734.84 ▼3.8334.21 ▼1.04
Add New Post /wp-admin/post-new.php1,533 ▼423.54 ▲5.54656.47 ▲24.1865.97 ▲4.88
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.02103.62 ▼4.7444.51 ▼3.36
Constant contact form /wp-admin/options-general.php?page=constant-contact-form1,0451.9928.0128.33

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
  • The uninstall procedure has failed, leaving 22 options in the database
    • ccf_usermail_content
    • ccf_button
    • ccf_homeurl
    • ccf_username
    • ccf_password
    • ccf_adminmail
    • can_compress_scripts
    • widget_theysaidso_widget
    • ccf_fromemail
    • ccf_usermail_subject
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/constant-contact-form/constant-contact-form.php:279

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: widget, contact, constant contact, constant

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

The main PHP script in "constant contact form" version 7.4 is automatically included on every request by 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin810 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP17316436
PO File292100234
JavaScript122109
CSS10031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
There were not PNG files found in your plugin