79% contact-form-db-divi

Code Review | Contact Form DB Divi

WordPress plugin Contact Form DB Divi scored79%from 54 tests.

About plugin

  • Plugin page: contact-form-db-divi
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 2, 2023
  • Latest release: Aug 28, 2023
  • Number of updates: 8
  • Update frequency: every 18.9 days
  • Top authors: themeythemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /2,258 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Contact Form DB Divi
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6040.13 ▼3.73
Dashboard /wp-admin3.91 ▲0.6152.73 ▲4.62
Posts /wp-admin/edit.php3.97 ▲0.6253.77 ▲3.89
Add New Post /wp-admin/post-new.php6.44 ▲0.55108.36 ▲10.02
Media Library /wp-admin/upload.php3.84 ▲0.6246.82 ▲10.30
Contact Us /wp-admin/edit.php?post_type=lwp_form_submission&page=contact-form-db-divi-contact3.7137.83
Support Forum /wp-admin/edit.php?post_type=lwp_form_submission&page=contact-form-db-divi-wp-support-forum3.5633.62
Divi Form DB /wp-admin/edit.php?post_type=lwp_form_submission3.8946.33
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0137.97
Upgrade  ➤ /wp-admin/edit.php?post_type=lwp_form_submission&page=contact-form-db-divi-pricing3.7238.25

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 185 new files
Database: no new tables, 10 new options
New WordPress options
fs_debug_mode
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
fs_accounts
fs_active_plugins
can_compress_scripts
widget_recent-posts
lwp_cfdb_plugin_version

Browser metrics Passed 4 tests

Contact Form DB Divi: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9413.15 ▼1.144.70 ▲3.0143.30 ▲1.61
Dashboard /wp-admin2,261 ▲584.83 ▼0.99109.57 ▲3.9348.20 ▲6.18
Posts /wp-admin/edit.php2,143 ▲462.18 ▲0.1642.31 ▲7.3740.88 ▲4.48
Add New Post /wp-admin/post-new.php1,560 ▲2917.66 ▼5.57655.33 ▼39.1056.44 ▼5.60
Media Library /wp-admin/upload.php1,440 ▲374.18 ▼0.06108.69 ▲9.6649.20 ▲3.62
Contact Us /wp-admin/edit.php?post_type=lwp_form_submission&page=contact-form-db-divi-contact1,5703.1349.5254.30
Support Forum /wp-admin/edit.php?post_type=lwp_form_submission&page=contact-form-db-divi-wp-support-forum1,5893.9786.9785.99
Divi Form DB /wp-admin/edit.php?post_type=lwp_form_submission1,0981.9934.6732.37
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1201.7124.4829.38
Upgrade  ➤ /wp-admin/edit.php?post_type=lwp_form_submission&page=contact-form-db-divi-pricing2,1643.3061.66124.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/contact-form-db-divi/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • fs_active_plugins
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • fs_debug_mode
    • widget_recent-comments
    • fs_accounts
    • can_compress_scripts
    • db_upgraded
    • lwp_cfdb_plugin_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention: Please take inspiration from this readme.txt

contact-form-db-divi/index.php 92% from 13 tests

The primary PHP file in "Contact Form DB Divi" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("contact-form-db-divi.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected33,439 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PHP1248,03317,35733,232
JavaScript33459194
CSS130013

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity83.06
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,272
▷ Static methods19915.64%
▷ Public methods88369.42%
▷ Protected methods171.34%
▷ Private methods37229.25%
Functions101
▷ Named functions101100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/contact-form-db-divi.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%