83% map-location-picker-at-checkout-for-woocommerce

Code Review | Kikote - Location Picker at Checkout & Google Address AutoFill Plugin for WooCommerce

WordPress plugin Kikote - Location Picker at Checkout & Google Address AutoFill Plugin for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: map-location-pick...
  • Plugin version: 1.8.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Jun 8, 2021
  • Latest release: Nov 15, 2023
  • Number of updates: 147
  • Update frequency: every 6.1 days
  • Top authors: Uriahs Victor (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

1,000+ active /44,417 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.92ms] Passed 4 tests

Server-side resources used by Kikote - Location Picker at Checkout & Google Address AutoFill Plugin for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.87 ▼5.21
Dashboard /wp-admin3.33 ▲0.0243.78 ▼3.68
Posts /wp-admin/edit.php3.38 ▲0.0247.47 ▲3.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.67 ▼17.96
Media Library /wp-admin/upload.php3.25 ▲0.0231.88 ▼0.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Kikote - Location Picker at Checkout & Google Address AutoFill Plugin for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4114.26 ▼0.091.97 ▼0.0142.18 ▲1.39
Dashboard /wp-admin2,208 ▲285.64 ▲0.0388.25 ▼5.4242.45 ▲4.39
Posts /wp-admin/edit.php2,113 ▲102.00 ▲0.0642.72 ▲6.2539.08 ▲4.98
Add New Post /wp-admin/post-new.php1,534 ▲523.26 ▲0.34677.37 ▼17.4362.86 ▲7.27
Media Library /wp-admin/upload.php1,404 ▲104.22 ▲0.0797.93 ▼2.3142.75 ▼2.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 140× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\ErrorCorrectionLevel\\ErrorCorrectionLevelInterface' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/endroid/qr-code/src/ErrorCorrectionLevel/ErrorCorrectionLevelHigh.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\RoundBlockSizeMode\\RoundBlockSizeModeInterface' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/endroid/qr-code/src/RoundBlockSizeMode/RoundBlockSizeModeMargin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/bacon/bacon-qr-code/test/Common/ModeTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/mjaschen/phpgeo/tests/Location/CardinalDirection/CardinalDirectionDistancesTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/mjaschen/phpgeo/tests/Location/PolylineTest.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\Label\\Alignment\\LabelAlignmentInterface' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/endroid/qr-code/src/Label/Alignment/LabelAlignmentLeft.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Exception\\ExceptionInterface' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/bacon/bacon-qr-code/src/Exception/InvalidArgumentException.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\RoundBlockSizeMode\\RoundBlockSizeModeInterface' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/endroid/qr-code/src/RoundBlockSizeMode/RoundBlockSizeModeNone.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Location\\Formatter\\Coordinate\\FormatterInterface' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/mjaschen/phpgeo/src/Formatter/Coordinate/GeoJSON.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/map-location-picker-at-checkout-for-woocommerce/vendor/mjaschen/phpgeo/tests/Location/CardinalDirection/CardinalDirectionTest.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: delivery map, woocommerce, geolocation, google map, location picker...

map-location-picker-at-checkout-for-woocommerce/lpac.php 85% from 13 tests

"Kikote - Location Picker at Checkout & Google Address AutoFill Plugin for WooCommerce" version 1.8.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.5" instead of "5.7")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("map-location-picker-at-checkout-for-woocommerce.php" instead of "lpac.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin56,338 lines of code in 468 files:
LanguageFilesBlank linesComment linesLines of code
PHP39012,65823,24853,149
Markdown3578201,784
JavaScript1481187502
JSON200386
CSS174815254
XML65483166
YAML28051
make113145
SVG1001

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity20.09
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces60
Interfaces35
Traits3
Classes274
▷ Abstract classes41.46%
▷ Concrete classes27098.54%
▷ Final classes10338.15%
Methods2,611
▷ Static methods35913.75%
▷ Public methods1,98776.10%
▷ Protected methods602.30%
▷ Private methods56421.60%
Functions136
▷ Named functions10879.41%
▷ Anonymous functions2820.59%
Constants280
▷ Global constants11440.71%
▷ Class constants16659.29%
▷ Public constants8148.80%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 2.41MB with 1.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/printus.png148.50KB89.54KB▼ 39.70%
assets/img/map-builder.png596.91KB189.95KB▼ 68.18%
assets/img/logo.png12.96KB4.54KB▼ 65.00%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendor/mjaschen/phpgeo/docs/100_Geometries/bounds-factory.png74.46KB26.85KB▼ 63.94%