58% doppler-form

Code Review | Doppler Forms

WordPress plugin Doppler Forms scored58%from 54 tests.

About plugin

  • Plugin page: doppler-form
  • Plugin version: 2.3.5
  • PHP compatiblity: 5.6.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2015
  • Latest release: Aug 9, 2023
  • Number of updates: 87
  • Update frequency: every 34.0 days
  • Top authors: fromdoppler (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /16,364 total downloads

Benchmarks

Plugin footprint 48% 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: ▲0.48MB] [CPU: ▼7.04ms] Passed 4 tests

Analyzing server-side resources used by Doppler Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5144.59 ▲2.92
Dashboard /wp-admin3.79 ▲0.4451.22 ▼7.43
Posts /wp-admin/edit.php3.85 ▲0.4947.02 ▼4.32
Add New Post /wp-admin/post-new.php6.39 ▲0.5085.10 ▼19.34
Media Library /wp-admin/upload.php3.72 ▲0.4838.84 ▲3.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 139 new files
Database: 4 new tables, 9 new options
New tables
wp_dplr_field
wp_dplr_form
wp_dplr_form_settings
wp_dplr_field_settings
New WordPress options
widget_theysaidso_widget
dplr_version
widget_recent-posts
dplr_hub_script
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_dplr_form_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Doppler Forms
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲21914.28 ▼0.2520.28 ▲18.6842.11 ▲1.65
Dashboard /wp-admin2,246 ▲695.12 ▼0.5185.87 ▼0.6681.43 ▲39.06
Posts /wp-admin/edit.php2,159 ▲592.57 ▲0.6242.11 ▼1.9735.28 ▲0.04
Add New Post /wp-admin/post-new.php1,570 ▲3423.59 ▲5.50669.63 ▲53.4834.82 ▼35.47
Media Library /wp-admin/upload.php1,442 ▲394.65 ▲0.46102.18 ▲5.2580.53 ▲38.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/doppler-form/uninstall.php+8
    Undefined index: slug
  • Zombie tables detected upon uninstall: 4 tables
    • wp_dplr_form
    • wp_dplr_field_settings
    • wp_dplr_field
    • wp_dplr_form_settings
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-comments
    • dplr_hub_script
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_dplr_form_widget
    • dplr_version
    • widget_theysaidso_widget

Smoke tests 50% 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 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
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/doppler-form/test/test-script-post-subscriber.php
    • > /wp-content/plugins/doppler-form/test/test-curl.php
    • > /wp-content/plugins/doppler-form/public/partials/doppler-forms-public-display.php
    • > /wp-content/plugins/doppler-form/test/test-get-list.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/doppler-form/admin/partials/forms-list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/doppler-form/admin/partials/forms-create.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/doppler-form/includes/class-doppler-form-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/doppler-form/admin/partials/lists-crud.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/doppler-form/admin/partials/api-connection.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/doppler-form/admin/partials/data-hub.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'DPLR_Base_Model' not found in wp-content/plugins/doppler-form/includes/models/Field_Model.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/doppler-form/admin/partials/extensions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/doppler-form/admin/partials/forms-edit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/doppler-form/admin/partials/doppler-forms-display.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "--"
You can take inspiration from this readme.txt

doppler-form/doppler-form.php 92% from 13 tests

The main PHP file in "Doppler Forms" ver. 2.3.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 191 characters long)

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
Good job! No executable or dangerous file extensions detected14,129 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
CSS81,1711,5046,405
PHP337746203,284
Sass18292132,363
PO File2413553886
JavaScript515044762
SVG907409
JSON10011
Markdown1709

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.26
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes28.70%
Methods122
▷ Static methods2318.85%
▷ Public methods10787.70%
▷ Protected methods10.82%
▷ Private methods1411.48%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/screenshot-1-esp.png4.79KB2.70KB▼ 43.56%
admin/img/screenshot-2-esp.png19.22KB6.96KB▼ 63.79%
admin/img/icon-doppler-menu.png0.95KB0.60KB▼ 36.58%
admin/img/screenshot-3.png6.68KB3.06KB▼ 54.27%
admin/img/MS.png79.64KB1.28KB▼ 98.39%