84% autolocation-checkout

Code Review | Autolocation on checkout

WordPress plugin Autolocation on checkout scored84%from 54 tests.

About plugin

  • Plugin page: autolocation-chec...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.5
  • WordPress version: 6.3.1
  • First release: May 11, 2021
  • Latest release: May 12, 2021
  • Number of updates: 8
  • Update frequency: every 27.9 days
  • Top authors: astri2002 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Autolocation on checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.22 ▼3.84
Dashboard /wp-admin3.36 ▲0.0543.69 ▼5.81
Posts /wp-admin/edit.php3.47 ▲0.1146.37 ▼2.12
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.51 ▼17.89
Media Library /wp-admin/upload.php3.28 ▲0.0533.43 ▼1.64

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Autolocation on checkout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲14413.68 ▼0.709.86 ▲7.8436.26 ▼8.47
Dashboard /wp-admin2,206 ▲214.85 ▼1.0199.11 ▼2.0438.43 ▼6.78
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0438.28 ▼2.7931.46 ▼4.97
Add New Post /wp-admin/post-new.php1,514 ▼2917.44 ▼0.85658.70 ▲22.5860.14 ▲8.45
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0095.95 ▼8.4541.58 ▲0.13

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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

SRP 50% from 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/autolocation-checkout/public/partials/autolocation-checkout-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: location, checkout, woocommerce

autolocation-checkout/autolocation-checkout.php 92% from 13 tests

The main PHP script in "Autolocation on checkout" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 226 characters long)

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
No dangerous file extensions were detected234 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8118385162
CSS14556
JavaScript182816

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected