67% contact-form-maker

Code Review | Contact Form by WD - responsive drag & drop contact form builder tool

WordPress plugin Contact Form by WD - responsive drag & drop contact form builder tool scored 67% from 54 tests.

About plugin

  • Plugin page: contact-form-maker
  • Plugin version: 1.13.23
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 5.8.1
  • First release: Mar 15, 2013
  • Latest release: Jan 12, 2021
  • Number of updates: 248
  • Update frequency: every 11.5 days
  • Top authors: webdorado (100%)

Code review

54 tests

User reviews

156 reviews

Install metrics

20,000+ active / 1,459,460 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲2.08MB] [CPU: ▼131.06ms] Passed 4 tests

Analyzing server-side resources used by Contact Form by WD - responsive drag & drop contact form builder tool
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.80 ▲4.0860.02 ▲37.93
Dashboard /wp-admin5.12 ▲2.0657.23 ▲8.43
Posts /wp-admin/edit.php5.16 ▲2.0554.33 ▲18.07
Add New Post /wp-admin/post-new.php7.64 ▲2.2096.59 ▼562.17
Media Library /wp-admin/upload.php5.02 ▲2.0144.84 ▲11.42
Options /wp-admin/admin.php?page=options_fmc5.0643.68
Themes /wp-admin/admin.php?page=themes_fmc6.3455.52
Submissions /wp-admin/admin.php?page=submissions_fmc5.7649.26
Overview /wp-admin/admin.php?page=overview_cfm4.9747.42
Add-ons /wp-admin/admin.php?page=addons_fmc5.0047.09
Blocked IPs /wp-admin/admin.php?page=blocked_ips_fmc5.0256.98
Premium Version /wp-admin/admin.php?page=pricing_fmc5.0144.43
Uninstall /wp-admin/admin.php?page=uninstall_fmc4.8241.53
Forms /wp-admin/admin.php?page=manage_fmc7.4685.12

Server storage [IO: ▲12.89MB] [DB: ▲0.14MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 937 new files
Database: 10 new tables, 4 new options
New tables
wp_formmaker_display_options
wp_formmaker_query
wp_formmaker_sessions
wp_formmaker_blocked
wp_formmaker_themes
wp_formmaker_submits
wp_formmaker_backup
wp_formmaker_views
wp_formmaker_groups
wp_formmaker
New WordPress options
cfm_admin_notice
contact_form_forms
widget_form_maker_widget
fmc_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form by WD - responsive drag & drop contact form builder tool
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,746 ▲15015.69 ▲0.187.64 ▼6.9546.55 ▼1.46
Dashboard /wp-admin3,028 ▲975.92 ▼0.05140.26 ▼10.22132.69 ▲11.35
Posts /wp-admin/edit.php2,821 ▲822.69 ▼0.0166.26 ▼8.63105.56 ▲7.31
Add New Post /wp-admin/post-new.php1,738 ▲23818.06 ▼0.68398.65 ▼16.55146.76 ▲22.57
Media Library /wp-admin/upload.php1,815 ▲84.98 ▼0.02132.13 ▼24.87150.62 ▲21.55
Options /wp-admin/admin.php?page=options_fmc1,6182.3558.62109.85
Themes /wp-admin/admin.php?page=themes_fmc2,5292.3965.30102.24
Submissions /wp-admin/admin.php?page=submissions_fmc1,4513.0272.87105.30
Overview /wp-admin/admin.php?page=overview_cfm1,9337.06275.83210.76
Add-ons /wp-admin/admin.php?page=addons_fmc2,2672.3457.30133.61
Blocked IPs /wp-admin/admin.php?page=blocked_ips_fmc1,4002.3761.08104.85
Premium Version /wp-admin/admin.php?page=pricing_fmc1,7242.3556.33100.04
Uninstall /wp-admin/admin.php?page=uninstall_fmc1,4822.3761.5991.37
Forms /wp-admin/admin.php?page=manage_fmc1,7772.4660.03111.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.14MB] 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
  • The plugin did not uninstall successfully, leaving 10 tables in the database
    • wp_formmaker_display_options
    • wp_formmaker_blocked
    • wp_formmaker_themes
    • wp_formmaker_submits
    • wp_formmaker_groups
    • wp_formmaker_sessions
    • wp_formmaker_backup
    • wp_formmaker
    • wp_formmaker_views
    • wp_formmaker_query
  • The uninstall procedure has failed, leaving 4 options in the database
    • widget_form_maker_widget
    • cfm_admin_notice
    • fmc_settings
    • contact_form_forms

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/contact-form-maker/contact-form-maker.php
    • > /wp-content/plugins/contact-form-maker/admin/views/view.php
  • 114× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CFMAdminController' not found in wp-content/plugins/contact-form-maker/admin/controllers/Show_matrix.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CFMAdminController' not found in wp-content/plugins/contact-form-maker/admin/controllers/Blocked_ips_fm.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CFMAdminController' not found in wp-content/plugins/contact-form-maker/admin/controllers/Select_data_from_db.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/contact-form-maker/wd/templates/display_deactivation_popup.php:8
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/contact-form-maker/wd/templates/display_deactivation_popup.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'CFMAdminController' not found in wp-content/plugins/contact-form-maker/admin/controllers/FMShortocde.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CFMAdminModel' not found in wp-content/plugins/contact-form-maker/admin/models/FormMakerSubmits.php:6
    • > PHP Notice
      Trying to get property 'plugin_wd_demo_link' of non-object in wp-content/plugins/contact-form-maker/wd/templates/display_overview_user_guide.php on line 28
    • > PHP Notice
      Undefined variable: wd_options in wp-content/plugins/contact-form-maker/wd/templates/display_deactivation_popup.php on line 6
    • > PHP Notice
      Trying to get property 'plugin_wizard_link' of non-object in wp-content/plugins/contact-form-maker/wd/templates/display_overview_welcome.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #8 (Select Columns) image required
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

contact-form-maker/contact-form-maker.php 92% from 13 tests

The main PHP file in "Contact Form by WD - responsive drag & drop contact form builder tool" ver. 1.13.23 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin175,356 lines of code in 234 files:
LanguageFilesBlank linesComment linesLines of code
PO File4837,88149,14390,227
PHP901,7333,23535,543
JavaScript353,9431,15131,184
CSS241,66515017,614
SVG341615674
Markdown1180112
HTML2002

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,600)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 654)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity69.88
▷ Minimum class complexity1.00
▷ Maximum class complexity1,600.00
Average method complexity11.25
▷ Minimum method complexity1.00
▷ Maximum method complexity654.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes81
▷ Abstract classes00.00%
▷ Concrete classes81100.00%
▷ Final classes11.23%
Methods545
▷ Static methods5710.46%
▷ Public methods48789.36%
▷ Protected methods122.20%
▷ Private methods468.44%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants28.70%
▷ Class constants2191.30%
▷ Public constants21100.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
543 PNG files occupy 2.59MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/05/02/submit.png1.29KB0.53KB▼ 59.06%
wd/assets/img/wds_main_plugin.png5.66KB3.74KB▼ 34.04%
images/flags/cz.png0.46KB0.61KB0.00%
images/03/date.png1.40KB0.71KB▼ 48.92%
images/info.png1.41KB1.35KB▼ 3.89%