89% autopostcode

Code Review | AutoPostcode

WordPress plugin AutoPostcode scored89%from 54 tests.

About plugin

  • Plugin page: autopostcode
  • Plugin version: 1.0
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 9
  • Update frequency: every 46.6 days
  • Top authors: creativemarketingltd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /772 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by AutoPostcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.98 ▼5.50
Dashboard /wp-admin3.32 ▼0.0348.34 ▼15.88
Posts /wp-admin/edit.php3.37 ▲0.0147.06 ▼3.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.43 ▼20.97
Media Library /wp-admin/upload.php3.24 ▲0.0139.22 ▲1.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

AutoPostcode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5713.34 ▼0.994.53 ▲2.7843.75 ▲0.87
Dashboard /wp-admin2,224 ▲174.84 ▼0.20111.47 ▼3.2042.38 ▼2.71
Posts /wp-admin/edit.php2,103 ▼02.05 ▲0.0636.94 ▼0.1634.72 ▼0.88
Add New Post /wp-admin/post-new.php1,552 ▼223.20 ▲4.95674.57 ▲34.6260.04 ▲6.10
Media Library /wp-admin/upload.php1,403 ▲64.20 ▼0.00103.54 ▲1.6446.83 ▲0.32

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in autopostcode/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

autopostcode/autopostcode.php Passed 13 tests

This is the main PHP file of "AutoPostcode" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
84 characters long description:
Adds an address dropdown list upon postcode entry on your WooCommerce checkout page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin416 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15338252
PHP35386158
CSS1146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity7.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
autopostcode_logo.png8.48KB3.84KB▼ 54.71%