94% gravityformsapprovals

Code Review | Gravity Forms Approvals Add-On

WordPress plugin Gravity Forms Approvals Add-On scored 94% from 54 tests.

About plugin

  • Plugin page: gravityformsappro...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6.2
  • WordPress version: 5.8.1
  • First release: May 20, 2015
  • Latest release: Feb 28, 2021
  • Number of updates: 38
  • Update frequency: every 55.6 days
  • Top authors: stevehenty (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 10,571 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼139.61ms] Passed 4 tests

An overview of server-side resources used by Gravity Forms Approvals Add-On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0041.21 ▲5.29
Dashboard /wp-admin3.07 ▲0.0158.65 ▲8.21
Posts /wp-admin/edit.php3.12 ▲0.0147.64 ▲0.64
Add New Post /wp-admin/post-new.php5.43 ▼0.0197.23 ▼565.26
Media Library /wp-admin/upload.php3.01 ▲0.0034.71 ▲0.91

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

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

Browser metrics Passed 4 tests

Gravity Forms Approvals Add-On: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.97 ▲0.438.60 ▼3.3451.22 ▲2.44
Dashboard /wp-admin2,966 ▲386.09 ▼0.04150.53 ▼19.98120.74 ▼8.44
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0272.24 ▲2.5588.57 ▼6.58
Add New Post /wp-admin/post-new.php1,591 ▼9218.79 ▲0.00386.90 ▼8.12113.68 ▼10.51
Media Library /wp-admin/upload.php1,807 ▼05.01 ▲0.01155.01 ▼8.47125.83 ▲2.80

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 successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravityformsapprovals/approvals.php:32

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)
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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: approvals, gravity forms, workflow

gravityformsapprovals/approvals.php 92% from 13 tests

The main file in "Gravity Forms Approvals Add-On" v. 1.2.1 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: The principal plugin file should be the same as the plugin slug ("gravityformsapprovals.php" instead of "approvals.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
Good job! No executable or dangerous file extensions detected350 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP282108350

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity25.00
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin