84% gf-uploads-as-attachments

Code Review | Gravity Forms - Uploads as Attachments

WordPress plugin Gravity Forms - Uploads as Attachments scored84%from 54 tests.

About plugin

  • Plugin page: gf-uploads-as-att...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2016
  • Latest release: Mar 15, 2020
  • Number of updates: 16
  • Update frequency: every 95.6 days
  • Top authors: Jebble (87.5%)elegantmodules (18.75%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /11,786 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.13ms] Passed 4 tests

This is a short check of server-side resources used by Gravity Forms - Uploads as Attachments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.98 ▲1.24
Dashboard /wp-admin3.32 ▲0.0251.80 ▲0.92
Posts /wp-admin/edit.php3.37 ▲0.0147.02 ▼0.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.33 ▼18.19
Media Library /wp-admin/upload.php3.24 ▲0.0136.37 ▲3.41

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Gravity Forms - Uploads as Attachments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲8714.23 ▼0.251.94 ▲0.0238.65 ▼8.10
Dashboard /wp-admin2,279 ▲995.55 ▼0.1289.44 ▼1.1547.03 ▲3.28
Posts /wp-admin/edit.php2,188 ▲882.15 ▲0.1442.31 ▲3.6540.40 ▲4.75
Add New Post /wp-admin/post-new.php1,603 ▲7423.59 ▲0.38664.61 ▲1.5756.15 ▼12.36
Media Library /wp-admin/upload.php1,487 ▲874.19 ▼0.03100.84 ▼7.4545.50 ▲0.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ElegantModules\\GFUploadsAttachments\\add_filter() in wp-content/plugins/gf-uploads-as-attachments/includes/class-notifications.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ElegantModules\\GFUploadsAttachments\\add_action() in wp-content/plugins/gf-uploads-as-attachments/includes/class-settings.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: notification, attachment, attachments, email, gravity forms...

gf-uploads-as-attachments/gforms-uploads-as-attachments.php 92% from 13 tests

The main PHP script in "Gravity Forms - Uploads as Attachments" version 1.3.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gf-uploads-as-attachments.php" instead of "gforms-uploads-as-attachments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin315 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47669315

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity12.67
▷ Minimum class complexity11.00
▷ Maximum class complexity15.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin