61% social-contact-form

Code Review | Connect Form to Chat Apps with Contact Form 7 Integration - FormyChat

WordPress plugin Connect Form to Chat Apps with Contact Form 7 Integration - FormyChat scored61%from 54 tests.

About plugin

  • Plugin page: social-contact-form
  • Plugin version: 2.6.6
  • PHP compatiblity: 5.6 or higher+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0 or higher-6.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2022
  • Latest release: Nov 14, 2023
  • Number of updates: 52
  • Update frequency: every 11.4 days
  • Top authors: azizultex (69.23%)iamjafran (17.31%)wppool (17.31%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /7,883 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▲0.60ms] Passed 4 tests

An overview of server-side resources used by Connect Form to Chat Apps with Contact Form 7 Integration - FormyChat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.7844.84 ▲4.10
Dashboard /wp-admin4.10 ▲0.7954.36 ▲4.40
Posts /wp-admin/edit.php4.14 ▲0.7859.92 ▲11.33
Add New Post /wp-admin/post-new.php6.69 ▲0.8093.82 ▼10.74
Media Library /wp-admin/upload.php4.02 ▲0.7940.71 ▲4.64
Settings /wp-admin/admin.php?page=formychat4.2169.15
Leads /wp-admin/admin.php?page=formychat-leads4.2143.57

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 112 new files
Database: 2 new tables, 14 new options
New tables
wp_scf_leads
wp_cf7_leads
New WordPress options
db_upgraded
widget_recent-comments
scf-setup-run
scf_contact_form_7
scf_activeform
can_compress_scripts
scf_icon
scf_whatsapp
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Connect Form to Chat Apps with Contact Form 7 Integration - FormyChat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,105 ▲34314.11 ▼0.2916.88 ▲15.1044.23 ▼0.37
Dashboard /wp-admin2,359 ▲1825.57 ▼0.0991.43 ▼10.2541.23 ▼6.51
Posts /wp-admin/edit.php2,268 ▲1682.11 ▲0.1136.07 ▼1.1330.83 ▼3.76
Add New Post /wp-admin/post-new.php1,507 ▼1916.75 ▼6.25606.27 ▼75.1346.06 ▼16.40
Media Library /wp-admin/upload.php1,564 ▲1614.19 ▼0.02102.46 ▲3.1542.37 ▲0.02
Settings /wp-admin/admin.php?page=formychat12,21110.13300.1492.18
Leads /wp-admin/admin.php?page=formychat-leads2,3135.82118.0234.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_cf7_leads
    • wp_scf_leads
  • The uninstall procedure has failed, leaving 13 options in the database
    • widget_recent-comments
    • scf_call_to_action
    • scf_activeform
    • widget_recent-posts
    • scf_whatsapp
    • scf_enabled
    • scf_contact_form_7
    • scf_form
    • db_upgraded
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/social-contact-form/templates/admin/leads/pagination.php
    • > /wp-content/plugins/social-contact-form/templates/admin/settings/progress-bar.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/social-contact-form/templates/admin/settings/setup-finished.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/social-contact-form/templates/admin/settings/section-whatsapp.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/social-contact-form/templates/admin/leads/content.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/social-contact-form/templates/admin/settings/section-customize.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/social-contact-form/templates/admin/settings/customize-call-to-action.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/social-contact-form/templates/admin/leads/modal.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/social-contact-form/templates/admin/settings/customize-form.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function scf_render() in wp-content/plugins/social-contact-form/templates/admin/settings/preview.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/social-contact-form/templates/admin/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/social-contact-form/templates/admin/leads/content-cf7.php:73

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=formychat-leads
    • > Javascript (severe) in unknown
    webpack://formychat/./src/js/admin/leads.js? 139:33 Uncaught TypeError: Cannot read properties of null (reading 'id')
    • > GET request to /wp-admin/admin.php?page=formychat-leads
    • > Console-api (warning) in unknown
    http://cdn.headwayapp.co/widget.js 0:6623 "[Headway Error]" "Element provided by selector does not exist."

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in social-contact-form/assets to your readme.txt
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

social-contact-form/plugin.php 69% from 13 tests

The entry point to "Connect Form to Chat Apps with Contact Form 7 Integration - FormyChat" version 2.6.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "5.6 or higher")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("social-contact-form.php" instead of "plugin.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "5.0 or higher")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected12,011 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP441,3792,0226,584
JSON2004,022
CSS67832460
Markdown21470446
JavaScript587142345
XML25584143
SVG20011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity30.40
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods195
▷ Static methods2512.82%
▷ Public methods15981.54%
▷ Protected methods73.59%
▷ Private methods2914.87%
Functions14
▷ Named functions964.29%
▷ Anonymous functions535.71%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.51MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/cf7.png76.77KB30.78KB▼ 59.91%
includes/wppool/background-image.png29.93KB32.87KB0.00%
includes/wppool/blackFriday.png58.47KB63.29KB0.00%
public/images/question.png23.23KB10.75KB▼ 53.73%
public/images/scf.png11.61KB4.90KB▼ 57.81%