89% gf-popup-confirmation

Code Review | Popup Confirmation for Gravity Forms

WordPress plugin Popup Confirmation for Gravity Forms scored89%from 54 tests.

About plugin

  • Plugin page: gf-popup-confirma...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Feb 26, 2020
  • Latest release: Oct 11, 2021
  • Number of updates: 5
  • Update frequency: every 118.8 days
  • Top authors: altitudemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /6,701 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Popup Confirmation for Gravity Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.59 ▼1.20
Dashboard /wp-admin3.31 ▼0.0449.09 ▼12.20
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▲1.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.41 ▼8.36
Media Library /wp-admin/upload.php3.23 ▲0.0033.34 ▼5.34

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Popup Confirmation for Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.051.64 ▲0.1044.10 ▲5.30
Dashboard /wp-admin2,195 ▲155.64 ▲0.0691.37 ▲3.2940.58 ▲0.22
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0538.87 ▲1.8235.88 ▲0.52
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▲0.22590.43 ▼48.9251.56 ▼7.93
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0396.41 ▼5.1841.23 ▼3.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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 to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This add-on nicely integrates with existing Gravity Forms Text Confirmation setting page. Enable or disable popup when needed. Optionally, you can add additional script to run if confirmation text is loaded.), #2 (Confirmation message is displayed in a modal popup (can be customised))
The official readme.txt is a good inspiration

gf-popup-confirmation/confirmation-popup-for-gravity-forms.php 92% from 13 tests

The main file in "Popup Confirmation for Gravity Forms" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("gf-popup-confirmation.php" instead of "confirmation-popup-for-gravity-forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin126 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12922126

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin