77% address-autocomplete-using-nextgenapi

Code Review | Autocomplete NextGenAPI Address

WordPress plugin Autocomplete NextGenAPI Address scored 77% 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: 6.3.1
  • 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 / 431 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.58MB] [CPU: ▲0.54ms] Passed 4 tests

An overview of server-side resources used by Autocomplete NextGenAPI Address
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2730.97 ▼11.15
Dashboard /wp-admin4.00 ▲0.6956.56 ▲10.75
Posts /wp-admin/edit.php4.02 ▲0.6653.41 ▲4.25
Add New Post /wp-admin/post-new.php6.58 ▲0.6992.97 ▲0.66
Media Library /wp-admin/upload.php3.92 ▲0.6943.20 ▲8.38

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Autocomplete NextGenAPI Address
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲18013.64 ▼0.665.06 ▲3.2438.74 ▼11.44
Dashboard /wp-admin2,233 ▲425.94 ▲0.00110.77 ▲10.2437.27 ▼8.27
Posts /wp-admin/edit.php2,116 ▲272.09 ▲0.1238.29 ▼0.1733.77 ▼3.83
Add New Post /wp-admin/post-new.php1,551 ▲2223.36 ▲5.08680.20 ▲62.2767.06 ▲0.46
Media Library /wp-admin/upload.php1,415 ▲304.29 ▲0.0499.06 ▼0.2944.79 ▼0.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 output text when accessed directly:
    • > /wp-content/plugins/address-autocomplete-using-nextgenapi/autocomplete-nextgenapi-address.php
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Textarea.php:13
    • > 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: Call to undefined function add_action() in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/example-functions.php:105
    • > 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_Counter_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/CMB2_Field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/types/CMB2_Type_Colorpicker.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_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/address-autocomplete-using-nextgenapi/cmb2/includes/CMB2.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
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
Please make the necessary changes and fix the following:
  • 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
  • Description: Please keep the plugin description shorter than 140 characters (currently 386 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("address-autocomplete-using-nextgenapi.php" instead of "autocomplete-nextgenapi-address.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected46,403 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP592,1596,3837,298
CSS132511,1954,543
JavaScript93766101,563
Markdown22190676

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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
Namespaces0
Interfaces0
Traits0
Classes68
▷ Abstract classes913.24%
▷ Concrete classes5986.76%
▷ Final classes00.00%
Methods536
▷ Static methods8816.42%
▷ Public methods44482.84%
▷ Protected methods8916.60%
▷ Private methods30.56%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants650.00%
▷ Class constants650.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ico-delete.png0.70KB0.72KB0.00%
cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%