68% data-collection-form

Code Review | Data Collection Form

WordPress plugin Data Collection Form scored68%from 54 tests.

About plugin

  • Plugin page: data-collection-form
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 6.3.1
  • First release: Aug 20, 2014
  • Latest release: Aug 20, 2014
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: faaiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,708 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Data Collection Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3147.53 ▲4.28
Dashboard /wp-admin3.61 ▲0.2651.04 ▼11.66
Posts /wp-admin/edit.php3.72 ▲0.3750.09 ▲1.76
Add New Post /wp-admin/post-new.php6.18 ▲0.30100.89 ▲0.07
Media Library /wp-admin/upload.php3.53 ▲0.3038.53 ▲2.99

Server storage [IO: ▲0.16MB] [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: 22 new files
Database: 4 new tables, 7 new options
New tables
wp_ugf_fields_validations
wp_ugf_fields
wp_ugf_forms
wp_ugf_fields_attributes
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
ugf_db_version
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Data Collection Form: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲18613.59 ▼0.7813.11 ▲11.4038.05 ▼5.65
Dashboard /wp-admin2,220 ▲405.65 ▼0.0283.30 ▼11.0042.62 ▼2.99
Posts /wp-admin/edit.php2,132 ▲322.25 ▲0.2834.53 ▼1.3337.11 ▼1.14
Add New Post /wp-admin/post-new.php1,549 ▲2123.28 ▲0.18686.70 ▼15.2656.72 ▲3.13
Media Library /wp-admin/upload.php1,428 ▲254.27 ▲0.16101.85 ▼9.1743.69 ▼4.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_ugf_fields_validations
    • wp_ugf_forms
    • wp_ugf_fields_attributes
    • wp_ugf_fields
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/data-collection-form/captcha.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/data-collection-form/data-collection-form.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: contact form, order form, newsletter form, date collection form, custom form

data-collection-form/data-collection-form.php Passed 13 tests

"Data Collection Form" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
58 characters long description:
Build all type of forms and save data in any type of post.

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
No dangerous file extensions were detected2,145 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3570291,738
JavaScript1594276
CSS2305131

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity46.00
▷ Minimum class complexity16.00
▷ Maximum class complexity76.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
css/images/ui-bg_diagonals-thick_26_2293f7_40x40.png0.40KB0.15KB▼ 61.33%
css/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png0.27KB0.10KB▼ 61.73%
css/images/ui-bg_diagonals-thick_22_1484e6_40x40.png0.40KB0.15KB▼ 62.10%
css/images/ui-icons_5fa5e3_256x240.png4.44KB4.17KB▼ 6.02%