83% gravity-forms-notification-attachments

Code Review | Gravity Forms: Notification Attachments

WordPress plugin Gravity Forms: Notification Attachments scored83%from 54 tests.

About plugin

  • Plugin page: gravity-forms-not...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.9
  • WordPress version: 6.3.1
  • First release: Jan 8, 2014
  • Latest release: Apr 30, 2014
  • Number of updates: 15
  • Update frequency: every 7.5 days
  • Top authors: codearachnid (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /10,025 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.34ms] Passed 4 tests

Server-side resources used by Gravity Forms: Notification Attachments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.74 ▲0.90
Dashboard /wp-admin3.33 ▲0.0351.99 ▼0.13
Posts /wp-admin/edit.php3.38 ▲0.0248.80 ▼5.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.01 ▼8.94
Media Library /wp-admin/upload.php3.25 ▲0.0242.33 ▲4.65

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms: Notification Attachments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.30 ▼0.061.87 ▲0.0243.74 ▲1.02
Dashboard /wp-admin2,209 ▲215.81 ▼0.07103.84 ▼3.4739.08 ▼3.19
Posts /wp-admin/edit.php2,095 ▲31.97 ▼0.0539.33 ▼5.0333.64 ▼1.98
Add New Post /wp-admin/post-new.php1,525 ▲1123.44 ▲5.76682.28 ▼5.8653.72 ▼0.16
Media Library /wp-admin/upload.php1,397 ▲94.20 ▲0.0198.69 ▼17.4745.13 ▼5.65

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-notification-attachments/gf-notification-attachment.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

gravity-forms-notification-attachments/gf-notification-attachment.php 85% from 13 tests

The main file in "Gravity Forms: Notification Attachments" v. 1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gravity-forms-notification-attachments.php" instead of "gf-notification-attachment.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Everything looks great! No dangerous files found in this plugin223 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP12448127
JavaScript2192564
LESS10031
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png23.08KB6.92KB▼ 70.04%