89% gravityformscli

Code Review | Gravity Forms CLI Add-On

WordPress plugin Gravity Forms CLI Add-On scored 89% from 54 tests.

About plugin

  • Plugin page: gravityformscli
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8
  • WordPress version: 6.3.1
  • First release: May 24, 2016
  • Latest release: Sep 6, 2021
  • Number of updates: 26
  • Update frequency: every 74.3 days
  • Top authors: stevehenty (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10,000+ active / 198,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Gravity Forms CLI Add-On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.89 ▼5.69
Dashboard /wp-admin3.32 ▲0.0243.60 ▼10.13
Posts /wp-admin/edit.php3.37 ▲0.0248.85 ▲0.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.44 ▼9.33
Media Library /wp-admin/upload.php3.24 ▲0.0234.97 ▼0.26

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Gravity Forms CLI Add-On: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.391.46 ▼0.3639.63 ▼11.00
Dashboard /wp-admin2,206 ▲214.86 ▼0.03111.44 ▼6.9943.18 ▼4.28
Posts /wp-admin/edit.php2,092 ▲62.03 ▲0.0334.48 ▲0.8530.86 ▼1.78
Add New Post /wp-admin/post-new.php1,537 ▲923.12 ▲0.32711.25 ▲52.1152.67 ▼1.76
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0197.11 ▼3.0640.64 ▼5.60

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: gravity forms

gravityformscli/cli.php 85% from 13 tests

The main PHP script in "Gravity Forms CLI Add-On" version 1.4 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gravityformscli.php" instead of "cli.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
No dangerous file extensions were detected1,574 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP115101,7441,574

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity34.70
▷ Minimum class complexity2.00
▷ Maximum class complexity97.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods68
▷ Static methods57.35%
▷ Public methods4972.06%
▷ Protected methods45.88%
▷ Private methods1522.06%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.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
No PNG files were detected