90% attachment-download-on-gravity-form-submission

Code Review | Attachment Download On Gravity Form Submission

WordPress plugin Attachment Download On Gravity Form Submission scored90%from 54 tests.

About plugin

  • Plugin page: attachment-downlo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 14, 2022
  • Latest release: Jul 15, 2022
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: weboccults (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,666 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.17ms] Passed 4 tests

A check of server-side resources used by Attachment Download On Gravity Form Submission
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.21 ▼16.95
Dashboard /wp-admin3.31 ▲0.0042.39 ▼1.73
Posts /wp-admin/edit.php3.36 ▲0.0047.58 ▲3.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.02 ▼0.67
Media Library /wp-admin/upload.php3.23 ▲0.0032.28 ▼1.32

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Attachment Download On Gravity Form Submission
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.15 ▼1.601.55 ▼0.7141.63 ▼17.01
Dashboard /wp-admin2,206 ▲154.87 ▼0.01107.37 ▲4.8143.79 ▲3.97
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0239.82 ▲5.1934.27 ▼2.14
Add New Post /wp-admin/post-new.php1,534 ▼223.00 ▼0.13590.43 ▼69.2156.25 ▲1.74
Media Library /wp-admin/upload.php1,382 ▼94.30 ▲0.0895.40 ▼1.5142.70 ▲0.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 97% 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
These attributes need your attention:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

attachment-download-on-gravity-form-submission/attachment-download-on-gravity-form-submission.php Passed 13 tests

The main PHP file in "Attachment Download On Gravity Form Submission" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
111 characters long description:
Admin can upload pdf or document attachment to each gravity form which will be downloaded after form submission

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
Good job! No executable or dangerous file extensions detected366 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36066287
JavaScript217479

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
PNG images were not found in this plugin