87% address-autocomplete-using-nextgenapi

Code Review | Autocomplete NextGenAPI Address

WordPress plugin Autocomplete NextGenAPI Address scored 87% from 54 tests.

About plugin

  • Plugin page: address-autocompl...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 5.9.2
  • First release: Mar 26, 2020
  • Latest release: Mar 26, 2020
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: nextgenapi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 266 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Autocomplete NextGenAPI Address
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3256.16 ▲3.47
Dashboard /wp-admin4.11 ▲0.7037.08 ▲2.76
Posts /wp-admin/edit.php4.30 ▲0.6644.38 ▲4.95
Add New Post /wp-admin/post-new.php7.58 ▲0.5996.20 ▼1,383.87
Media Library /wp-admin/upload.php3.99 ▲0.6928.00 ▲3.65

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 345 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Autocomplete NextGenAPI Address
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,934 ▲21216.79 ▲0.8610.68 ▲4.832.21 ▼0.32
Dashboard /wp-admin2,921 ▲606.34 ▲0.13120.44 ▼13.27162.85 ▲5.05
Posts /wp-admin/edit.php2,721 ▲303.28 ▼0.0865.08 ▼0.32142.72 ▼2.29
Add New Post /wp-admin/post-new.php1,685 ▲2416.75 ▲0.14410.78 ▼35.44151.06 ▲0.08
Media Library /wp-admin/upload.php1,728 ▲335.59 ▲0.06141.43 ▼3.10190.44 ▲6.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/address-autocomplete-using-nextgenapi/autocomplete-nextgenapi-address.php
  • 40× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/CMB2_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-autocomplete-using-nextgenapi/admin_settings.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Oembed.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 83% 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
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

address-autocomplete-using-nextgenapi/autocomplete-nextgenapi-address.php 69% from 13 tests

This is the main PHP file of "Autocomplete NextGenAPI Address" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 386 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("address-autocomplete-using-nextgenapi.php" instead of "autocomplete-nextgenapi-address.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 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected46,403 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.97
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
▷ Abstract classes913.24%
▷ Concrete classes5986.76%
▷ Final classes00.00%
▷ Static methods8816.42%
▷ Public methods44482.84%
▷ Protected methods8916.60%
▷ Private methods30.56%
▷ Named functions38100.00%
▷ Anonymous functions00.00%
▷ 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
cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%