84% search-field-for-gravity-forms

Code Review | Search Field for Gravity Forms

WordPress plugin Search Field for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: search-field-for-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2021
  • Latest release: Apr 6, 2023
  • Number of updates: 18
  • Update frequency: every 40.1 days
  • Top authors: wpsunshine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Search Field for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.38 ▼6.82
Dashboard /wp-admin3.31 ▲0.0044.92 ▼7.74
Posts /wp-admin/edit.php3.36 ▲0.0050.53 ▲2.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.62 ▼6.90
Media Library /wp-admin/upload.php3.23 ▲0.0033.59 ▲0.17

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Search Field for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.191.74 ▲0.0642.12 ▲2.99
Dashboard /wp-admin2,209 ▲214.85 ▼0.0496.91 ▼6.7938.46 ▼5.78
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0440.46 ▼1.2535.04 ▼0.29
Add New Post /wp-admin/post-new.php1,551 ▲3717.91 ▲0.43588.99 ▼103.2370.75 ▲17.28
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0098.19 ▼14.4244.13 ▼1.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/search-field-for-gravity-forms/gravityforms-search.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/search-field-for-gravity-forms/class-gfwpsunshinesearchfieldaddon.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
3 plugin tags: search, gravityforms, gravity forms

search-field-for-gravity-forms/gravityforms-search.php 85% from 13 tests

The main PHP script in "Search Field for Gravity Forms" version 1.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("search-field-for-gravity-forms.php" instead of "gravityforms-search.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin337 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP367143316
CSS10020
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.33
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin