90% customize-submit-button-for-gravity-forms

Code Review | Customize Submit Button for Gravity Forms

WordPress plugin Customize Submit Button for Gravity Forms scored90%from 54 tests.

About plugin

  • Plugin page: customize-submit-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Dec 24, 2015
  • Number of updates: 6
  • Update frequency: every 7.2 days
  • Top authors: omurphy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /18,209 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Customize Submit Button for Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.86 ▼2.05
Dashboard /wp-admin3.34 ▼0.0043.45 ▼17.04
Posts /wp-admin/edit.php3.39 ▲0.0442.14 ▼3.68
Add New Post /wp-admin/post-new.php5.92 ▲0.0482.04 ▼12.14
Media Library /wp-admin/upload.php3.26 ▲0.0436.19 ▲2.25

Server storage [IO: ▲0.03MB] [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
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Customize Submit Button for Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.45 ▼0.281.73 ▲0.3040.68 ▲1.12
Dashboard /wp-admin2,192 ▲125.55 ▼0.0687.25 ▼1.6738.46 ▲1.71
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0535.10 ▼5.7330.87 ▼5.56
Add New Post /wp-admin/post-new.php1,526 ▼1122.97 ▲4.85587.64 ▼20.6948.12 ▼66.15
Media Library /wp-admin/upload.php1,397 ▼34.20 ▼0.0195.39 ▼9.3539.80 ▼3.61

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

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

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 Passed 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
3 plugin tags: button, gravityforms, form

customize-submit-button-for-gravity-forms/customize-submit-button-for-gravity-forms.php Passed 13 tests

The main PHP file in "Customize Submit Button for Gravity Forms" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
118 characters long description:
Lets you customize the submit button in Gravity Forms by switching it to a button element and changing its CSS classes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected226 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15128208
JavaScript19018

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin