84% gravity-forms-toolbar

Code Review | Gravity Forms Toolbar

WordPress plugin Gravity Forms Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-too...
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2012
  • Latest release: Feb 21, 2019
  • Number of updates: 45
  • Update frequency: every 57.6 days
  • Top authors: daveshine (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /59,037 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 gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.97ms] Passed 4 tests

Analyzing server-side resources used by Gravity Forms Toolbar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1144.10 ▼5.19
Dashboard /wp-admin3.47 ▲0.1745.63 ▼4.29
Posts /wp-admin/edit.php3.59 ▲0.2348.31 ▼4.41
Add New Post /wp-admin/post-new.php6.05 ▲0.1796.44 ▲4.73
Media Library /wp-admin/upload.php3.39 ▲0.1737.65 ▲2.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms Toolbar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.55 ▼0.841.70 ▼0.2042.72 ▼3.78
Dashboard /wp-admin2,212 ▲244.85 ▼1.0199.47 ▼17.4338.60 ▼4.41
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0239.56 ▲3.2234.74 ▲0.32
Add New Post /wp-admin/post-new.php1,541 ▲723.36 ▲0.27595.96 ▼52.0451.10 ▼2.06
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0193.86 ▼7.1442.06 ▼4.69

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • 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
Everything seems fine, however 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
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/gravity-forms-toolbar/admin/form.php
    • > /wp-content/plugins/gravity-forms-toolbar/lib/gftb-resources.php
    • > /wp-content/plugins/gravity-forms-toolbar/lib/gftb-admin-extras.php
    • > /wp-content/plugins/gravity-forms-toolbar/gravity-forms-toolbar.php
    • > /wp-content/plugins/gravity-forms-toolbar/lib/gftb-addons.php
    • > /wp-content/plugins/gravity-forms-toolbar/lib/gftb-languages.php
    • > /wp-content/plugins/gravity-forms-toolbar/admin/tabs/settings.php
    • > /wp-content/plugins/gravity-forms-toolbar/lib/gftb-admin-settings.php
    • > /wp-content/plugins/gravity-forms-toolbar/lib/gftb-plugins.php
    • > /wp-content/plugins/gravity-forms-toolbar/lib/gftb-functions.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can take inspiration from this readme.txt

gravity-forms-toolbar/gravity-forms-toolbar.php Passed 13 tests

"Gravity Forms Toolbar" version 1.7.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
105 characters long description:
This plugin adds useful admin links and resources for Gravity Forms to the WordPress Toolbar / Admin Bar.

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
There were no executable files found in this plugin5,179 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP178871,2962,968
PO File41,0201,1482,211

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.74
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%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
9 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gravityforms-icon-lightgrey.png0.95KB0.83KB▼ 12.76%
images/gravityforms-icon-turquoise.png0.80KB0.83KB0.00%
images/gravityforms-icon-pink.png0.97KB0.83KB▼ 15.33%
images/gravityforms-icon-red.png0.93KB0.83KB▼ 11.43%
images/gravityforms-icon.png1.02KB1.02KB0.00%