88% address-autocomplete-using-google-place-api

Code Review | Address Autocomplete Using Google Place Api

WordPress plugin Address Autocomplete Using Google Place Api scored 88% from 54 tests.

About plugin

  • Plugin page: address-autocompl...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Sep 2, 2016
  • Latest release: Sep 8, 2016
  • Number of updates: 15
  • Update frequency: every 0.5 days
  • Top authors: webnware (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active / 16,396 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Address Autocomplete Using Google Place Api
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0256.27 ▲5.97
Dashboard /wp-admin3.44 ▲0.0334.32 ▼2.07
Posts /wp-admin/edit.php3.67 ▲0.0339.85 ▲4.43
Add New Post /wp-admin/post-new.php6.91 ▼0.0693.16 ▼1,186.26
Media Library /wp-admin/upload.php3.32 ▲0.0324.44 ▲0.52
Google Autocomplete /wp-admin/options-general.php?page=google_autocomplete3.2923.67

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Address Autocomplete Using Google Place Api
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,917 ▲16317.21 ▲1.6018.35 ▲11.652.81 ▲0.20
Dashboard /wp-admin2,897 ▲466.12 ▼0.08117.93 ▼14.92155.23 ▼1.21
Posts /wp-admin/edit.php2,696 ▲113.23 ▼0.1262.86 ▼2.33136.51 ▼8.65
Add New Post /wp-admin/post-new.php1,755 ▲321.82 ▲0.28438.15 ▼11.79159.95 ▼1.15
Media Library /wp-admin/upload.php1,703 ▲55.52 ▲0.05145.38 ▲5.42192.30 ▲4.52
Google Autocomplete /wp-admin/options-general.php?page=google_autocomplete1,1942.3755.53113.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/address-autocomplete-using-google-place-api/address-autocomplete-using-google-place-api.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-autocomplete-using-google-place-api/admin_settings.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

address-autocomplete-using-google-place-api/address-autocomplete-using-google-place-api.php 92% from 13 tests

The main PHP file in "Address Autocomplete Using Google Place Api" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin170 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31814160
JavaScript14210

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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