84% address-autocomplete-anything

Code Review | Address Autocomplete Anything

WordPress plugin Address Autocomplete Anything scored 84% from 54 tests.

About plugin

  • Plugin page: address-autocompl...
  • Plugin version: 0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.9
  • WordPress version: 5.9.2
  • First release: Feb 11, 2022
  • Latest release: Feb 11, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wpsunshine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 99 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼304.62ms] Passed 4 tests

A check of server-side resources used by Address Autocomplete Anything
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0656.85 ▲4.90
Dashboard /wp-admin3.55 ▲0.1433.74 ▼7.45
Posts /wp-admin/edit.php3.77 ▲0.1338.23 ▼42.96
Add New Post /wp-admin/post-new.php7.01 ▲0.0494.35 ▼1,171.50
Media Library /wp-admin/upload.php3.42 ▲0.1326.62 ▲3.42
Address Autocomplete /wp-admin/options-general.php?page=wps_aa3.4024.95

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
wps_aa_install_time

Browser metrics Passed 4 tests

A check of browser resources used by Address Autocomplete Anything
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲3616.05 ▲0.396.23 ▲0.812.19 ▼0.67
Dashboard /wp-admin2,897 ▲436.12 ▼0.05117.84 ▼22.61159.12 ▼1.23
Posts /wp-admin/edit.php2,696 ▲53.24 ▲0.0063.81 ▼1.77140.74 ▼9.33
Add New Post /wp-admin/post-new.php1,763 ▲10222.69 ▲7.03439.96 ▲14.24162.36 ▲5.42
Media Library /wp-admin/upload.php1,706 ▲55.52 ▲0.03149.33 ▲2.24187.84 ▲1.12
Address Autocomplete /wp-admin/options-general.php?page=wps_aa2,5753.0969.80190.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • wps_aa_install_time

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/address-autocomplete-anything/address-autocomplete.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-autocomplete-anything/includes/admin/promos.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/address-autocomplete-anything/includes/admin/class-options.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: woocommerce, google, gravityforms, form, autocomplete...

address-autocomplete-anything/address-autocomplete.php 92% from 13 tests

The main PHP script in "Address Autocomplete Anything" version 0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("address-autocomplete-anything.php" instead of "address-autocomplete.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected814 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP410119692
JavaScript2261571
CSS27050
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity27.00
▷ Minimum class complexity18.00
▷ Maximum class complexity36.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods1976.00%
▷ Protected methods28.00%
▷ Private methods416.00%
Functions5
▷ Named functions5100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/select2/select2x2.png0.83KB0.77KB▼ 6.15%
assets/js/select2/select2.png0.60KB0.99KB0.00%