78% gravity-forms-addons

Code Review | Gravity Forms Directory

WordPress plugin Gravity Forms Directory scored78%from 54 tests.

About plugin

  • Plugin page: gravity-forms-addons
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 6.3.1
  • First release: Nov 5, 2009
  • Latest release: Dec 7, 2020
  • Number of updates: 190
  • Update frequency: every 21.3 days
  • Top authors: katzwebdesign (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

1,000+ active /182,394 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Gravity Forms Directory
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.27 ▼5.02
Dashboard /wp-admin3.31 ▼0.0443.69 ▼19.65
Posts /wp-admin/edit.php3.36 ▲0.0046.72 ▲2.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.59 ▼23.18
Media Library /wp-admin/upload.php3.23 ▲0.0032.55 ▼2.58

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 312 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms Directory
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.011.58 ▼0.1144.34 ▲3.67
Dashboard /wp-admin2,206 ▲185.86 ▲0.96107.32 ▲3.6142.37 ▼0.04
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0539.16 ▲5.4435.26 ▲4.07
Add New Post /wp-admin/post-new.php1,517 ▼1617.70 ▼5.42648.44 ▼37.7553.12 ▼0.33
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.0897.84 ▼2.6043.12 ▼0.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gravity-forms-addons/includes/views/html-entry-detail.php
    • > /wp-content/plugins/gravity-forms-addons/includes/class-select-directory-columns.php
    • > /wp-content/plugins/gravity-forms-addons/includes/views/html-field-ids.php
    • > /wp-content/plugins/gravity-forms-addons/includes/entry-details.php
  • 35× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: Form in wp-content/plugins/gravity-forms-addons/includes/views/html-entry-detail.php on line 50
    • > PHP Notice
      Undefined variable: titleshow in wp-content/plugins/gravity-forms-addons/includes/views/html-gf-directory-shortcode.php on line 72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/gravity-forms-addons/includes/views/html-gravityview-info-admin.php:98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravity-forms-addons/includes/gravity-forms-referrer.php:95
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gravity-forms-addons/includes/views/template-row.php:289
    • > PHP Notice
      Undefined variable: search_query in wp-content/plugins/gravity-forms-addons/includes/views/template-row.php on line 284
    • > PHP Notice
      Undefined variable: entrydetailtitle in wp-content/plugins/gravity-forms-addons/includes/views/html-entry-detail.php on line 15
    • > PHP Notice
      Undefined variable: Form in wp-content/plugins/gravity-forms-addons/includes/views/html-entry-detail.php on line 52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_print_styles() in wp-content/plugins/gravity-forms-addons/includes/views/html-select-column-page.php:16
    • > PHP Notice
      Undefined variable: lead_count in wp-content/plugins/gravity-forms-addons/includes/views/html-gf-directory-shortcode.php on line 127

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Approving directory entries is very easy), #2 (When using the Form Editor, your form fields will have a Directory tab for easily modifying your display options.), #3 (This plugin adds an Edit link to Gravity Form entries), #4 (Insert a directory), #5 (How the Gravity Forms widget appears on the widgets page), #6 (The Gravity Forms Addons settings page, found in the Forms > Directory & Addons menu link), #7 (How the Gravity Forms 'Add Fields' boxes look after plugin is activated)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The entry point to "Gravity Forms Directory" version 4.2 is a PHP file that has certain tags in its header comment area
63 characters long description:
Turn Gravity Forms into a great WordPress directory...and more!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin121,506 lines of code in 238 files:
LanguageFilesBlank linesComment linesLines of code
HTML862,30437597,141
JavaScript851,2582,14610,987
PHP221,0038504,895
CSS252644143,694
PO File51,1201,1283,014
JSON121501,047
Markdown22260483
LESS14344245

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity70.00
▷ Minimum class complexity1.00
▷ Maximum class complexity342.00
Average method complexity5.52
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods122
▷ Static methods9376.23%
▷ Public methods11291.80%
▷ Protected methods10.82%
▷ Private methods97.38%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
32 compressed PNG files occupy 0.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png48.44KB14.83KB▼ 69.38%
bower_components/colorbox/example1/images/overlay.png0.11KB0.15KB0.00%
bower_components/colorbox/example5/images/loading_background.png0.13KB0.15KB0.00%
bower_components/jquery.tablesorter/addons/pager/icons/prev.png0.73KB0.73KB0.00%
bower_components/jquery.tablesorter/docs/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%