84% tooltip-for-gravity-forms

Code Review | Tooltip for Gravity Forms

WordPress plugin Tooltip for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: tooltip-for-gravi...
  • Plugin version: 2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Dec 7, 2019
  • Latest release: Dec 22, 2021
  • Number of updates: 44
  • Update frequency: every 17.0 days
  • Top authors: mehbubrashid (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /17,930 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Tooltip for Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0334.77 ▼5.94
Dashboard /wp-admin3.33 ▼0.0243.68 ▼17.59
Posts /wp-admin/edit.php3.38 ▲0.0247.96 ▼0.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.95 ▲4.55
Media Library /wp-admin/upload.php3.25 ▲0.0237.71 ▲5.99

Server storage [IO: ▲0.84MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
gravity_tooltip_options
tooltip_plugin_version
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Tooltip for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲15013.44 ▼1.119.40 ▲7.7239.15 ▼4.72
Dashboard /wp-admin2,202 ▲255.63 ▲0.0091.00 ▼0.4141.04 ▼2.96
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0246.68 ▲9.1135.33 ▲1.28
Add New Post /wp-admin/post-new.php1,530 ▲222.92 ▼0.42665.21 ▲10.5459.40 ▲4.55
Media Library /wp-admin/upload.php1,398 ▼54.20 ▼0.0597.61 ▲5.9244.61 ▲4.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • gravity_tooltip_options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • tooltip_plugin_version
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tooltip-for-gravity-forms/admin/partials/gravity-forms-tooltip-admin-display.php
    • > /wp-content/plugins/tooltip-for-gravity-forms/public/partials/gravity-forms-tooltip-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention: The official readme.txt is a good inspiration

tooltip-for-gravity-forms/tooltip-for-gravity-forms.php Passed 13 tests

The main PHP script in "Tooltip for Gravity Forms" version 2.9 is automatically included on every request by WordPress
51 characters long description:
Add Tooltips next to field labels of Gravity Forms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected405 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12168556341
JavaScript4226034
CSS2101130

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.14
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/i.png38.11KB20.85KB▼ 45.29%