83% gf-google-address-autocomplete

Code Review | Address Autocomplete via Google for Gravity Forms

WordPress plugin Address Autocomplete via Google for Gravity Forms scored83%from 54 tests.

About plugin

  • Plugin page: gf-google-address...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Dec 29, 2020
  • Latest release: Apr 29, 2022
  • Number of updates: 9
  • Update frequency: every 54.1 days
  • Top authors: kaisarahmmed (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /8,263 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.66ms] Passed 4 tests

Analyzing server-side resources used by Address Autocomplete via Google for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.36 ▲1.35
Dashboard /wp-admin3.37 ▲0.0641.74 ▼2.21
Posts /wp-admin/edit.php3.42 ▲0.0644.50 ▼0.29
Add New Post /wp-admin/post-new.php5.97 ▲0.0878.80 ▼19.81
Media Library /wp-admin/upload.php3.29 ▲0.0633.50 ▼0.34

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Address Autocomplete via Google for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.25 ▼0.995.70 ▲3.8644.77 ▲1.17
Dashboard /wp-admin2,208 ▲204.88 ▲0.03109.89 ▼3.2238.92 ▼2.80
Posts /wp-admin/edit.php2,094 ▲52.04 ▲0.0440.69 ▲5.0337.14 ▲2.85
Add New Post /wp-admin/post-new.php1,539 ▲1118.33 ▲0.05619.57 ▼3.8549.90 ▲0.52
Media Library /wp-admin/upload.php1,390 ▲54.24 ▼0.01102.29 ▼13.5544.01 ▲2.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-google-address-autocomplete/frontend/class-frontend.php:6
    • > PHP Warning
      Unterminated comment starting line 2 in wp-content/plugins/gf-google-address-autocomplete/index.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

gf-google-address-autocomplete/gf-auto-address-complete.php 85% from 13 tests

Analyzing the main PHP file in "Address Autocomplete via Google for Gravity Forms" version 1.3.0
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gf-google-address-autocomplete.php" instead of "gf-auto-address-complete.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected596 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45723466
JavaScript2231130

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin