78% autocomplete-google-address

Code Review | Autocomplete Google Address

WordPress plugin Autocomplete Google Address scored78%from 54 tests.

About plugin

  • Plugin page: autocomplete-goog...
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 4, 2019
  • Latest release: Nov 1, 2023
  • Number of updates: 32
  • Update frequency: every 48.4 days
  • Top authors: nishatbd31 (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /35,414 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▼3.92ms] Passed 4 tests

Server-side resources used by Autocomplete Google Address
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3742.31 ▼0.20
Dashboard /wp-admin3.96 ▲0.6147.79 ▼14.15
Posts /wp-admin/edit.php3.99 ▲0.6256.50 ▲6.59
Add New Post /wp-admin/post-new.php6.55 ▲0.6696.46 ▼7.19
Media Library /wp-admin/upload.php3.89 ▲0.6541.12 ▲5.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Autocomplete Google Address
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19414.66 ▲0.2433.51 ▲31.6742.96 ▲2.61
Dashboard /wp-admin2,222 ▲425.63 ▼0.0193.54 ▼1.9039.19 ▼8.13
Posts /wp-admin/edit.php2,130 ▲332.04 ▲0.0743.35 ▲2.7834.55 ▼5.48
Add New Post /wp-admin/post-new.php1,544 ▲723.14 ▲4.85660.85 ▲66.4350.22 ▼30.14
Media Library /wp-admin/upload.php1,430 ▲274.30 ▲0.1099.77 ▼9.1441.73 ▼3.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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 | 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/autocomplete-google-address/autocomplete-google-address.php
  • 39× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autocomplete-google-address/metabox/includes/helper-functions.php:131
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/autocomplete-google-address/metabox/includes/types/CMB2_Type_Text_Date.php:13

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #2 (This is the second screen shot)
The official readme.txt is a good inspiration

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

The principal PHP file in "Autocomplete Google Address" v. 2.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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
Success! There were no dangerous files found in this plugin45,993 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP572,0776,1257,000
CSS121,1641,1484,648
JavaScript73314991,390
Markdown22140632

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.56
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes812.12%
▷ Concrete classes5887.88%
▷ Final classes00.00%
Methods519
▷ Static methods8616.57%
▷ Public methods42882.47%
▷ Protected methods8816.96%
▷ Private methods30.58%
Functions39
▷ Named functions39100.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 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
metabox/images/ico-delete.png0.70KB0.72KB0.00%
metabox/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
metabox/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
metabox/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
metabox/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%