62% contactum

Code Review | Contactum Drag & Drop Contact Form Builder For WordPress

WordPress plugin Contactum Drag & Drop Contact Form Builder For WordPress scored62%from 54 tests.

About plugin

  • Plugin page: contactum
  • Plugin version: 3.9.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Oct 17, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 86
  • Update frequency: every 12.9 days
  • Top authors: rajib00002 (98.84%)engramium (2.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,504 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.32MB] [CPU: ▲1.33ms] Passed 4 tests

A check of server-side resources used by Contactum Drag & Drop Contact Form Builder For WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.35 ▲0.8839.54 ▲1.51
Dashboard /wp-admin4.84 ▲1.4954.09 ▼6.04
Posts /wp-admin/edit.php4.89 ▲1.5261.18 ▲13.78
Add New Post /wp-admin/post-new.php7.35 ▲1.4689.16 ▲0.47
Media Library /wp-admin/upload.php4.67 ▲1.4444.13 ▲9.39
Entries /wp-admin/admin.php?page=contactum-entries4.8443.65
Forms /wp-admin/admin.php?page=contactum4.8443.88
Settings /wp-admin/admin.php?page=contactum-settings4.6742.12
Tools /wp-admin/admin.php?page=contactum-tools4.7441.70

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 154 new files
Database: 2 new tables, 11 new options
New tables
wp_contactum_entries
wp_contactum_entrymeta
New WordPress options
widget_contactumform_widget
contactum_settings
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
contactum_version
contactum_installed
widget_recent-posts
theysaidso_admin_options
contactum_reCaptcha
...

Browser metrics Passed 4 tests

A check of browser resources used by Contactum Drag & Drop Contact Form Builder For WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲21615.30 ▲0.551.69 ▲0.1138.26 ▼1.23
Dashboard /wp-admin2,383 ▲2066.93 ▲1.33126.42 ▲35.0041.86 ▲2.16
Posts /wp-admin/edit.php2,318 ▲2363.60 ▲1.5859.26 ▲24.5831.70 ▼5.25
Add New Post /wp-admin/post-new.php1,565 ▲3723.67 ▲0.49619.14 ▲6.6834.86 ▼13.54
Media Library /wp-admin/upload.php1,451 ▲545.03 ▲0.9081.25 ▼17.4742.69 ▼1.66
Entries /wp-admin/admin.php?page=contactum-entries1,1223.7148.6124.27
Forms /wp-admin/admin.php?page=contactum1,3733.7143.4374.20
Settings /wp-admin/admin.php?page=contactum-settings1,1043.6748.6729.92
Tools /wp-admin/admin.php?page=contactum-tools1,29112.68257.8730.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_contactum_entries
    • wp_contactum_entrymeta
  • Zombie WordPress options were found after uninstall: 11 options
    • contactum_installed
    • theysaidso_admin_options
    • widget_recent-posts
    • contactum_version
    • can_compress_scripts
    • contactum_reCaptcha
    • widget_recent-comments
    • db_upgraded
    • contactum_settings
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/contactum/includes/html/form.php
  • 51× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Fields\\Contactum_Field' not found in wp-content/plugins/contactum/includes/fields/class-field-number.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Fields\\Contactum_Field' not found in wp-content/plugins/contactum/includes/fields/class-fields-pro.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Fields\\Contactum_Field' not found in wp-content/plugins/contactum/includes/fields/class-field-checkbox.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Fields\\Contactum_Field' not found in wp-content/plugins/contactum/includes/fields/class-field-recaptcha.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Fields\\Contactum_Field' not found in wp-content/plugins/contactum/includes/fields/class-field-phone.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Importer\\Importer_Abstract' not found in wp-content/plugins/contactum/includes/importer/class-importer-gf.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Fields\\Field_Checkbox' not found in wp-content/plugins/contactum/includes/fields/class-field-radio.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Templates\\Contactum_Form_Template' not found in wp-content/plugins/contactum/includes/templates/class-template-support.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/contactum/includes/html/modal.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Contactum\\Fields\\Field_Dropdown' not found in wp-content/plugins/contactum/includes/fields/class-field-multidropdown.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Cannot find element: #contactum-admin-tools"
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Property or method \"left\" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.\n\nfound in\n\n---> \u003CNewTools> at src/admin/pages/NewTools.vue\n \u003CRoot>"
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Property or method \"handleClick\" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.\n\nfound in\n\n---> \u003CNewTools> at src/admin/pages/NewTools.vue\n \u003CRoot>"
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Invalid handler for event \"tab-click\": got undefined\n\nfound in\n\n---> \u003CElTabs> at packages/tabs/src/tabs.vue\n \u003CNewTools> at src/admin/pages/NewTools.vue\n \u003CRoot>"
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Property or method \"importedForms\" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.\n\nfound in\n\n---> \u003CImportforms> at src/admin/pages/tools/ImportForms.vue\n \u003CElTabPane> at packages/tabs/src/tab-pane.vue\n \u003CElTabs> at packages/tabs/src/tabs.vue\n \u003CNewTools> at src/admin/pages/NewTools.vue\n \u003CRoot>"
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Property or method \"clear\" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.\n\nfound in\n\n---> \u003CImportforms> at src/admin/pages/tools/ImportForms.vue\n \u003CElTabPane> at packages/tabs/src/tab-pane.vue\n \u003CElTabs> at packages/tabs/src/tabs.vue\n \u003CNewTools> at src/admin/pages/NewTools.vue\n \u003CRoot>"
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Property or method \"importing\" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.\n\nfound in\n\n---> \u003CImportforms> at src/admin/pages/tools/ImportForms.vue\n \u003CElTabPane> at packages/tabs/src/tab-pane.vue\n \u003CElTabs> at packages/tabs/src/tabs.vue\n \u003CNewTools> at src/admin/pages/NewTools.vue\n \u003CRoot>"
    • > GET request to /wp-admin/admin.php?page=contactum-tools
    • > Console-api (severe) in unknown
    webpack://contact/./node_modules/vue/dist/vue.esm.js? 631:14 "[Vue warn]: Invalid handler for event \"click\": got undefined\n\nfound in\n\n---> \u003CImportforms> at src/admin/pages/tools/ImportForms.vue\n \u003CElTabPane> at packages/tabs/src/tab-pane.vue\n \u003CElTabs> at packages/tabs/src/tabs.vue\n \u003CNewTools> at src/admin/pages/NewTools.vue\n \u003CRoot>"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #10, #11, #12, #13, #3, #4, #5, #9 in contactum/assets to your readme.txt
You can take inspiration from this readme.txt

contactum/contactum.php 85% from 13 tests

The main PHP file in "Contactum Drag & Drop Contact Form Builder For WordPress" ver. 3.9.9 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected27,166 lines of code in 129 files:
LanguageFilesBlank linesComment linesLines of code
PHP922,4032,15213,024
JavaScript214,5604,71611,562
CSS151691142,579
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.95
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces9
Interfaces0
Traits3
Classes81
▷ Abstract classes44.94%
▷ Concrete classes7795.06%
▷ Final classes11.30%
Methods581
▷ Static methods203.44%
▷ Public methods50987.61%
▷ Protected methods193.27%
▷ Private methods539.12%
Functions36
▷ Named functions2672.22%
▷ Anonymous functions1027.78%
Constants19
▷ Global constants842.11%
▷ Class constants1157.89%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.48MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/form-template/event.png84.84KB15.00KB▼ 82.32%
assets/images/form-template/contact.png51.41KB8.40KB▼ 83.67%
assets/images/del-img.png0.56KB0.43KB▼ 23.13%
assets/images/slack.png13.59KB5.91KB▼ 56.51%
assets/images/form-template/blank.png1.94KB1.75KB▼ 9.43%