78% autocomplete-google-places

Code Review | Autocomplete Google places

WordPress plugin Autocomplete Google places scored78%from 54 tests.

About plugin

  • Plugin page: autocomplete-goog...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6+
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: Jun 2, 2022
  • Number of updates: 8
  • Update frequency: every 7.9 days
  • Top authors: kais1977 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.61MB] [CPU: ▼1.25ms] Passed 4 tests

Analyzing server-side resources used by Autocomplete Google places
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.3845.86 ▼0.54
Dashboard /wp-admin4.27 ▲0.7063.68 ▲6.49
Posts /wp-admin/edit.php4.35 ▲0.6757.72 ▲5.88
Add New Post /wp-admin/post-new.php6.85 ▲0.7092.23 ▼16.13
Media Library /wp-admin/upload.php4.19 ▲0.7047.07 ▲5.81

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 344 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Autocomplete Google places
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19914.76 ▲0.4831.06 ▲29.3946.18 ▲3.84
Dashboard /wp-admin2,225 ▲545.68 ▲0.0884.73 ▼6.7138.56 ▼6.83
Posts /wp-admin/edit.php2,127 ▲272.07 ▲0.0436.81 ▲1.1236.47 ▲1.58
Add New Post /wp-admin/post-new.php1,562 ▲3623.06 ▲5.39657.51 ▼43.8048.55 ▼4.99
Media Library /wp-admin/upload.php1,421 ▲214.28 ▲0.0897.16 ▼14.1241.48 ▼5.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/autocomplete-google-places/autocomplete-google-places.php
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_Text_Date.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_Select_Timezone.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_File.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_Picker_Base.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_Taxonomy_Select.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_Multi_Base.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/autocomplete-google-places/library/includes/types/CMB2_Type_Taxonomy_Base.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/autocomplete-google-places/library/includes/CMB2.php:101
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autocomplete-google-places/library/example-functions.php:521

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
No plugin tags provided

autocomplete-google-places/autocomplete-google-places.php 85% from 13 tests

The main PHP script in "Autocomplete Google places" version 1.4.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 145 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
There were no executable files found in this plugin46,374 lines of code in 202 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP592,1776,3887,296
CSS122501,1904,554
JavaScript83615831,433
Markdown32490768

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity19.31
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes68
▷ Abstract classes913.24%
▷ Concrete classes5986.76%
▷ Final classes00.00%
Methods542
▷ Static methods9116.79%
▷ Public methods45083.03%
▷ Protected methods8916.42%
▷ Private methods30.55%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants650.00%
▷ Class constants650.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
library/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
library/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
library/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
library/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
library/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%