58% forms-for-divi

Code Review | Divi Form Builder With Material Design

WordPress plugin Divi Form Builder With Material Design scored58%from 54 tests.

About plugin

  • Plugin page: forms-for-divi
  • Plugin version: 8.2.0
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 19, 2022
  • Latest release: Nov 24, 2023
  • Number of updates: 8
  • Update frequency: every 62.4 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,030 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.06MB] [CPU: ▲23.92ms] 75% from 4 tests

Server-side resources used by Divi Form Builder With Material Design
It is recommended to improve the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.06MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.92 ▲5.4562.91 ▲19.20
Dashboard /wp-admin8.94 ▲5.5975.58 ▲8.26
Posts /wp-admin/edit.php8.94 ▲5.5884.33 ▲33.62
Add New Post /wp-admin/post-new.php9.49 ▲3.60123.48 ▲34.61
Media Library /wp-admin/upload.php8.94 ▲5.7166.12 ▲34.74
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.9466.68

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 306 new files
Database: 1 new table, 9 new options
New tables
wp_wpt_form_entries
New WordPress options
fs_debug_mode
theysaidso_admin_options
fs_accounts
widget_recent-comments
widget_recent-posts
db_upgraded
fs_active_plugins
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Divi Form Builder With Material Design: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲7814.16 ▼0.551.74 ▼0.2527.50 ▼19.95
Dashboard /wp-admin2,228 ▲485.54 ▼0.1097.37 ▲4.4545.96 ▲2.73
Posts /wp-admin/edit.php2,134 ▲342.03 ▲0.0339.93 ▲2.5537.99 ▲5.11
Add New Post /wp-admin/post-new.php1,549 ▲2322.98 ▼0.35619.28 ▼19.5751.90 ▼1.25
Media Library /wp-admin/upload.php1,433 ▲334.25 ▲0.0697.07 ▼1.7144.00 ▲3.84
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1011.6425.3829.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/forms-for-divi/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 1 table
    • wp_wpt_form_entries
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • fs_active_plugins
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_debug_mode
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • fs_accounts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/forms-for-divi/resources/views/admin/getting_started.php
  • 36× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPT\\DiviForms\\Form\\InputFields\\InputField' not found in wp-content/plugins/forms-for-divi/includes/classes/Form/InputFields/Checkboxes.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'WPTools\\Psr\\Container\\ContainerInterface' not found in wp-content/plugins/forms-for-divi/vendor/wpt00ls/pimple/src/Pimple/Psr11/ServiceLocator.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'WPT\\DiviForms\\Form\\Validator\\Constraints\\Constraint' not found in wp-content/plugins/forms-for-divi/includes/classes/Form/Validator/Constraints/Required.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_allowed_html() in wp-content/plugins/forms-for-divi/resources/views/partials/entry.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/forms-for-divi/resources/views/admin/listing.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'WPTools\\Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/forms-for-divi/vendor/wpt00ls/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/forms-for-divi/includes/modules/CheckboxesField/CheckboxesField.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/forms-for-divi/includes/modules/RadioButtonsField/RadioButtonsField.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'WPTools\\Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/forms-for-divi/vendor/wpt00ls/pimple/src/Pimple/Exception/FrozenServiceException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/forms-for-divi/includes/modules/FileUploadField/FileUploadField.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: divi forms, forms, material design, divi material design form, divi form...

forms-for-divi/forms-for-divi.php 92% from 13 tests

The primary PHP file in "Divi Form Builder With Material Design" version 8.2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected41,477 lines of code in 254 files:
LanguageFilesBlank linesComment linesLines of code
PHP2069,43619,48640,140
SVG900646
JavaScript83661222
JSON300186
CSS25229162
reStructuredText19613997
XML12016
Markdown1508

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity38.96
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces25
Interfaces5
Traits0
Classes123
▷ Abstract classes43.25%
▷ Concrete classes11996.75%
▷ Final classes21.68%
Methods1,824
▷ Static methods21912.01%
▷ Public methods1,42077.85%
▷ Protected methods180.99%
▷ Private methods38621.16%
Functions142
▷ Named functions10171.13%
▷ Anonymous functions4128.87%
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.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/forms-for-divi.png3.80KB2.41KB▼ 36.77%