84% simple-address-autocomplete

Code Review | Simple Address Autocomplete

WordPress plugin Simple Address Autocomplete scored84%from 54 tests.

About plugin

  • Plugin page: simple-address-au...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 6, 2022
  • Latest release: May 30, 2023
  • Number of updates: 10
  • Update frequency: every 32.9 days
  • Top authors: razakhadim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,162 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.49ms] Passed 4 tests

Server-side resources used by Simple Address Autocomplete
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1341.24 ▲3.45
Dashboard /wp-admin3.42 ▲0.0745.01 ▼14.56
Posts /wp-admin/edit.php3.54 ▲0.1747.60 ▼1.06
Add New Post /wp-admin/post-new.php6.02 ▲0.1389.84 ▼9.78
Media Library /wp-admin/upload.php3.35 ▲0.1137.74 ▲4.78
Simple Autocomplete /wp-admin/options-general.php?page=simple_autocomplete3.3233.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Address Autocomplete
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.17 ▼0.3825.55 ▲23.8437.87 ▼3.15
Dashboard /wp-admin2,203 ▲235.60 ▼0.0792.59 ▲7.0839.47 ▼4.00
Posts /wp-admin/edit.php2,108 ▲81.97 ▼0.0342.48 ▲5.5338.13 ▲4.10
Add New Post /wp-admin/post-new.php1,542 ▲1418.46 ▼4.88624.50 ▼63.1480.18 ▲29.24
Media Library /wp-admin/upload.php1,408 ▲84.22 ▼0.0192.52 ▼10.1743.94 ▼1.33
Simple Autocomplete /wp-admin/options-general.php?page=simple_autocomplete1,8662.1225.0134.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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 | 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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-address-autocomplete/admin/partials/simple-address-autocomplete-admin-display.php
    • > /wp-content/plugins/simple-address-autocomplete/public/partials/simple-address-autocomplete-public-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: address, google maps, autocomplete, google maps autocomplete, google address autocomplete

simple-address-autocomplete/simple-address-autocomplete.php Passed 13 tests

The principal PHP file in "Simple Address Autocomplete" v. 1.2.1 is loaded by WordPress automatically on each request
80 characters long description:
A simple way to add Google address autocomplete functionality to any form field.

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 detected656 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13111248596
JavaScript15253
CSS2147

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin