83% addresser-autocomplete-and-address-validation

Code Review | Addresser | Auto complete and address validation

WordPress plugin Addresser | Auto complete and address validation scored83%from 54 tests.

About plugin

  • Plugin page: addresser-autocom...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2022
  • Latest release: Jan 17, 2023
  • Number of updates: 6
  • Update frequency: every 4.5 days
  • Top authors: addresser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.32ms] Passed 4 tests

Server-side resources used by Addresser | Auto complete and address validation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.28 ▼0.29
Dashboard /wp-admin3.36 ▲0.0547.28 ▼4.31
Posts /wp-admin/edit.php3.41 ▲0.0550.07 ▼3.68
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.25 ▼13.00
Media Library /wp-admin/upload.php3.28 ▲0.0538.81 ▼0.22

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Addresser | Auto complete and address validation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.73 ▲0.102.37 ▲0.6541.68 ▼3.84
Dashboard /wp-admin2,198 ▲215.59 ▼0.0795.36 ▼4.7742.55 ▼2.22
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0439.77 ▲2.7236.98 ▲1.87
Add New Post /wp-admin/post-new.php1,533 ▲522.85 ▼0.30658.96 ▼6.4463.98 ▲1.71
Media Library /wp-admin/upload.php1,400 ▲64.20 ▼0.0597.04 ▲1.9744.60 ▼0.65

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addresser-autocomplete-and-address-validation/assets/inc/addresser-wc-settings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Attributes that require attention: You can take inspiration from this readme.txt

addresser-autocomplete-and-address-validation/addresser.php 85% from 13 tests

The principal PHP file in "Addresser | Auto complete and address validation" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("addresser-autocomplete-and-address-validation.php" instead of "addresser.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 255 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected450 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP767114339
CSS161105
JavaScript11176

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin