93% gf-upload-to-email-attachment

Code Review | GF Upload to Email Attachment

WordPress plugin GF Upload to Email Attachment scored 93% from 54 tests.

About plugin

  • Plugin page: gf-upload-to-emai...
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-5.3.2
  • WordPress version: 5.8.1
  • First release: Jul 3, 2014
  • Latest release: Mar 11, 2020
  • Number of updates: 29
  • Update frequency: every 71.7 days
  • Top authors: BilliardGreg (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 11,689 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼142.82ms] Passed 4 tests

A check of server-side resources used by GF Upload to Email Attachment
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1538.00 ▲15.30
Dashboard /wp-admin3.09 ▲0.0338.93 ▼16.17
Posts /wp-admin/edit.php3.14 ▲0.0347.89 ▲4.68
Add New Post /wp-admin/post-new.php5.45 ▲0.0190.77 ▼564.63
Media Library /wp-admin/upload.php3.03 ▲0.0338.55 ▲4.83

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GF Upload to Email Attachment
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.82 ▲0.3010.27 ▲0.5050.11 ▲4.48
Dashboard /wp-admin2,970 ▲365.92 ▼0.06145.23 ▼2.83110.02 ▼2.49
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0068.65 ▼0.6583.12 ▼20.72
Add New Post /wp-admin/post-new.php1,672 ▲17218.87 ▲0.31391.64 ▼0.90102.55 ▼0.89
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.00169.95 ▲15.06116.44 ▲2.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gf-upload-to-email-attachment/gf-upload-to-email-attachment.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
Attributes that need to be fixed:
  • Tags: The plugin tags were not defined
  • Screenshots: Please add an image for screenshot #1 (No Screenshot)
Please take inspiration from this readme.txt

gf-upload-to-email-attachment/gf-upload-to-email-attachment.php 92% from 13 tests

This is the main PHP file of "GF Upload to Email Attachment" version 2.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 430 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11210128

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin