82% db-form

Code Review | DB Form

WordPress plugin DB Form scored 82% from 54 tests.

About plugin

  • Plugin page: db-form
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.1
  • WordPress version: 5.9.2
  • First release: May 16, 2012
  • Latest release: May 16, 2013
  • Number of updates: 55
  • Update frequency: every 6.6 days
  • Top authors: valentinalisch (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active / 9,378 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.29MB] [CPU: ▼303.57ms] Passed 4 tests

An overview of server-side resources used by DB Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0780.37 ▲28.00
Dashboard /wp-admin3.32 ▼0.0824.50 ▼11.14
Posts /wp-admin/edit.php3.39 ▼0.2527.16 ▼15.68
Add New Post /wp-admin/post-new.php6.10 ▼0.87140.77 ▼1,179.89
Media Library /wp-admin/upload.php3.33 ▲0.0421.42 ▼7.58
DB Form /wp-admin/admin.php?page=dbf_settings3.3025.88
Error Messages /wp-admin/admin.php?page=dbf-error-messages3.3023.09

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

DB Form: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,855 ▲13315.97 ▲0.706.50 ▲0.312.16 ▲0.10
Dashboard /wp-admin2,962 ▲1046.12 ▼0.14131.39 ▼14.94170.83 ▲1.74
Posts /wp-admin/edit.php2,760 ▲663.25 ▲0.0165.08 ▲1.72145.02 ▼0.52
Add New Post /wp-admin/post-new.php1,714 ▼318.56 ▼2.75400.66 ▼58.15214.95 ▲47.46
Media Library /wp-admin/upload.php1,769 ▲745.54 ▼0.00141.00 ▼2.30196.11 ▼51.04
DB Form /wp-admin/admin.php?page=dbf_settings1,3032.4155.39154.28
Error Messages /wp-admin/admin.php?page=dbf-error-messages1,1422.5556.62129.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dbf-error-messages
    • > Notice in wp-content/plugins/db-form/php/admin111.php+15
    Undefined index: dbf_got_notice
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dbf-error-messages
    • > Notice in wp-content/plugins/db-form/php/admin111.php+72
    Undefined index: settings-updated

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/db-form/php/connector111.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/db-form/php/admin111.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/db-form/php/shortcodes111.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/db-form/db_form_plugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Possible form configuration), #2 (Error message), #3 (Admin Panel)
You can look at the official readme.txt

db-form/db_form_plugin.php 92% from 13 tests

The principal PHP file in "DB Form" v. 1.1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("db-form.php" instead of "db_form_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,213 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4120119995
CSS2227212
JavaScript1006

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.20MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png53.79KB22.13KB▼ 58.85%
screenshot-3.png115.73KB37.66KB▼ 67.46%
img/icon_warning.png0.30KB0.35KB0.00%
img/icon_submit_invert.png0.24KB0.33KB0.00%
img/icon_submit.png0.26KB0.33KB0.00%