78% gb-forms-db

Code Review | GB Forms DB

WordPress plugin GB Forms DB scored 78% from 54 tests.

About plugin

  • Plugin page: gb-forms-db
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Aug 24, 2022
  • Latest release: Aug 16, 2023
  • Number of updates: 7
  • Update frequency: every 51.7 days
  • Top authors: gb-plugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 317 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼4.03ms] Passed 4 tests

Server-side resources used by GB Forms DB
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.90 ▼14.52
Dashboard /wp-admin3.50 ▲0.2048.31 ▼1.49
Posts /wp-admin/edit.php3.61 ▲0.2647.61 ▼3.39
Add New Post /wp-admin/post-new.php6.08 ▲0.1996.50 ▲3.75
Media Library /wp-admin/upload.php3.42 ▲0.1938.79 ▲3.30
All Leads /wp-admin/admin.php?page=gbformsdbadmin_leads3.3932.87
GB Forms DB /wp-admin/admin.php?page=gbformsdbadmin3.3949.50

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
gbfdb_supported_plugins
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for GB Forms DB
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.67 ▼1.091.70 ▼0.3742.83 ▼13.65
Dashboard /wp-admin2,229 ▲415.95 ▲1.0699.35 ▼15.1782.04 ▲42.63
Posts /wp-admin/edit.php2,121 ▲351.99 ▼0.0538.25 ▼0.3934.24 ▼1.39
Add New Post /wp-admin/post-new.php1,550 ▲2118.50 ▲0.56720.20 ▼1.4358.62 ▼9.80
Media Library /wp-admin/upload.php1,417 ▲294.24 ▲0.0598.79 ▼1.7173.49 ▲30.11
All Leads /wp-admin/admin.php?page=gbformsdbadmin_leads8171.8426.1025.14
GB Forms DB /wp-admin/admin.php?page=gbformsdbadmin1,0881.8539.7368.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • gbfdb_supported_plugins
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gbformsdbadmin
    • > Notice in wp-content/plugins/gb-forms-db/gb-forms-db.php+37
    ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gb-forms-db/core/class/GBFields.php
    • > /wp-content/plugins/gb-forms-db/core/class/class-start.php
    • > /wp-content/plugins/gb-forms-db/core/class/GBFLeads.php
    • > /wp-content/plugins/gb-forms-db/gb-forms-db.php
    • > /wp-content/plugins/gb-forms-db/core/class/GBFDBAdmin.php
    • > /wp-content/plugins/gb-forms-db/core/gbfdb_notice.php
    • > /wp-content/plugins/gb-forms-db/core/class/GBFLead.php
    • > /wp-content/plugins/gb-forms-db/core/functions.php
    • > /wp-content/plugins/gb-forms-db/core/class/GBFDBFront.php

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

gb-forms-db/gb-forms-db.php Passed 13 tests

The principal PHP file in "GB Forms DB" v. 1.0.2 is loaded by WordPress automatically on each request
48 characters long description:
save all forms leads as GB Forms DB based on CPT

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
There were no executable files found in this plugin3,879 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP93064291,816
CSS45781,088
JavaScript89938728
PO File1104114247

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity36.71
▷ Minimum class complexity5.00
▷ Maximum class complexity81.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods95
▷ Static methods00.00%
▷ Public methods7376.84%
▷ Protected methods00.00%
▷ Private methods2223.16%
Functions25
▷ Named functions2080.00%
▷ Anonymous functions520.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/status-new.png1.70KB0.60KB▼ 64.68%
images/gb_admin_menu.png1.49KB0.85KB▼ 43.30%
images/rtl-status-new.png1.67KB0.61KB▼ 63.56%