83% contact-bank

Code Review | Contact Bank - Contact Form Builder for WordPress

WordPress plugin Contact Bank - Contact Form Builder for WordPress scored 83% from 54 tests.

About plugin

  • Plugin page: contact-bank
  • Plugin version: 3.0.30
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7
  • WordPress version: 5.8.1
  • First release: Sep 17, 2013
  • Latest release: Mar 13, 2021
  • Number of updates: 509
  • Update frequency: every 5.4 days
  • Top authors: contact-banker (100%)

Code review

54 tests

User reviews

212 reviews

Install metrics

9,000+ active / 2,615,226 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.59MB] [CPU: ▼136.72ms] Passed 4 tests

Analyzing server-side resources used by Contact Bank - Contact Form Builder for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▲0.5928.85 ▲4.78
Dashboard /wp-admin3.85 ▲0.7942.14 ▲9.37
Posts /wp-admin/edit.php3.87 ▲0.7539.04 ▼1.10
Add New Post /wp-admin/post-new.php5.74 ▲0.3079.90 ▼558.04
Media Library /wp-admin/upload.php3.73 ▲0.7330.51 ▲7.47
Roles and Capabilities /wp-admin/admin.php?page=cb_roles_and_capabilities4.3032.06
/wp-admin/admin.php?page=cb_add_new_form4.3047.56
Custom CSS /wp-admin/admin.php?page=cb_custom_css4.3030.64
/wp-admin/admin.php?page=cb_wizard_contact_bank4.3036.12
Forms /wp-admin/admin.php?page=contact_dashboard4.3032.53
Form Submissions /wp-admin/admin.php?page=cb_submissions4.3031.87
System Information /wp-admin/admin.php?page=cb_system_information4.3030.65
Email Templates /wp-admin/admin.php?page=cb_email_templates4.3031.55
/wp-admin/admin.php?page=cb_add_new_email_template4.2829.58
General Settings /wp-admin/admin.php?page=cb_general_settings4.3032.03

Server storage [IO: ▲3.06MB] [DB: ▲0.02MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/contact-bank/" and "wp-content/uploads/"
    • (new file) wp-content/contact-bank/.empty
Filesystem: 117 new files
Database: 2 new tables, 3 new options
New tables
wp_contact_bank
wp_contact_bank_meta
New WordPress options
widget_contact_bank_widget
cb_admin_notice
contact-bank-version-number

Browser metrics Passed 4 tests

Contact Bank - Contact Form Builder for WordPress: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,214 ▲56416.28 ▲0.3010.00 ▲4.9062.46 ▼17.11
Dashboard /wp-admin3,268 ▲3766.23 ▲0.10116.49 ▼17.10198.61 ▲17.31
Posts /wp-admin/edit.php2,928 ▲1883.14 ▼0.0865.53 ▲0.31141.21 ▲4.73
Add New Post /wp-admin/post-new.php4,247 ▲51221.16 ▲2.53435.86 ▲14.15197.99 ▲40.54
Media Library /wp-admin/upload.php1,959 ▲2075.64 ▲0.15128.89 ▼13.33202.04 ▲15.86
Roles and Capabilities /wp-admin/admin.php?page=cb_roles_and_capabilities1,5883.7677.77200.81
/wp-admin/admin.php?page=cb_add_new_form1,6283.7076.60211.44
Custom CSS /wp-admin/admin.php?page=cb_custom_css1,6273.4866.67196.96
/wp-admin/admin.php?page=cb_wizard_contact_bank1,6353.5271.25207.22
Forms /wp-admin/admin.php?page=contact_dashboard1,6323.4867.65199.23
Form Submissions /wp-admin/admin.php?page=cb_submissions1,6323.4868.01199.50
System Information /wp-admin/admin.php?page=cb_system_information1,6323.4766.11199.88
Email Templates /wp-admin/admin.php?page=cb_email_templates1,6273.4667.44203.22
/wp-admin/admin.php?page=cb_add_new_email_template1,5412.8656.35102.28
General Settings /wp-admin/admin.php?page=cb_general_settings1,6253.5366.43198.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_contact_bank_widget

Smoke tests 75% 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 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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/contact-bank/lib/shortcode.php:8
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/contact-bank/lib/shortcode.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/contact-bank/lib/dashboard-widget.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: A description for screenshot #11 is missing in contact-bank/assets to your readme.txt
You can take inspiration from this readme.txt

contact-bank/contact-bank.php 92% from 13 tests

This is the main PHP file of "Contact Bank - Contact Form Builder for WordPress" version 3.0.30, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
There were no executable files found in this plugin43,542 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP3640886519,497
JavaScript122,3807,36312,757
CSS15744659,826
SVG7051,462

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.29
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods413.79%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
36 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/ui-bg_flat_10_000000_40x100.png0.08KB0.08KB0.00%
assets/global/img/portlet-config-icon-white.png0.27KB0.44KB0.00%
assets/admin/images/ui-icons_228ef1_256x240.png3.68KB4.17KB0.00%
user-views/assets/img/no.png3.79KB0.46KB▼ 87.74%
assets/admin/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.14KB0.15KB0.00%