90% wc-hkgov-address-autofill

Code Review | Autofilll HKGov Address For WC

WordPress plugin Autofilll HKGov Address For WC scored90%from 54 tests.

About plugin

  • Plugin page: wc-hkgov-address-...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 28, 2022
  • Latest release: Oct 28, 2022
  • Number of updates: 2
  • Update frequency: every 7.0 days
  • Top authors: kyktommy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.74ms] Passed 4 tests

An overview of server-side resources used by Autofilll HKGov Address For WC
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.26 ▼1.56
Dashboard /wp-admin3.31 ▲0.0044.43 ▼3.48
Posts /wp-admin/edit.php3.36 ▲0.0048.10 ▼0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.00 ▼13.87
Media Library /wp-admin/upload.php3.23 ▲0.0033.39 ▲1.34

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Autofilll HKGov Address For WC
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.14 ▼1.241.80 ▲0.2241.46 ▼0.01
Dashboard /wp-admin2,206 ▲184.88 ▼0.00109.54 ▲4.3845.47 ▲2.20
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0338.96 ▼4.0135.66 ▲0.08
Add New Post /wp-admin/post-new.php1,533 ▲1423.48 ▲0.28603.93 ▼33.7947.96 ▼6.35
Media Library /wp-admin/upload.php1,388 ▲34.31 ▲0.1398.38 ▼5.1943.31 ▼1.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: autocomplete google address, google address autocomplete, hong kong, address autocomplete, hong kong address autocomplete...

wc-hkgov-address-autofill/hkgov-address-autofill-plugin.php 92% from 13 tests

The entry point to "Autofilll HKGov Address For WC" version 1.0.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-hkgov-address-autofill.php" instead of "hkgov-address-autofill-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin439 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP36778248
JavaScript2271190
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.33
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/select2.png0.60KB0.99KB0.00%
assets/images/select2x2.png0.64KB0.77KB0.00%