84% map-to-address

Code Review | Map to Address

WordPress plugin Map to Address scored84%from 54 tests.

About plugin

  • Plugin page: map-to-address
  • Plugin version: 1.0.14
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 24, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 22
  • Update frequency: every 48.7 days
  • Top authors: sarankumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.07ms] Passed 4 tests

A check of server-side resources used by Map to Address
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0422.19 ▼18.20
Dashboard /wp-admin3.35 ▲0.0045.15 ▼13.31
Posts /wp-admin/edit.php3.40 ▲0.0448.65 ▲1.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.70 ▼9.76
Media Library /wp-admin/upload.php3.27 ▲0.0438.32 ▲4.50

Server storage [IO: ▲0.19MB] [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: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Map to Address
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,479 ▼26714.23 ▼0.330.51 ▼1.8317.24 ▼24.51
Dashboard /wp-admin2,220 ▲405.63 ▼0.0797.15 ▲5.2842.41 ▲0.46
Posts /wp-admin/edit.php2,125 ▲252.04 ▲0.0939.16 ▼1.3136.59 ▼1.33
Add New Post /wp-admin/post-new.php1,546 ▲2023.08 ▼0.12654.59 ▼115.4062.31 ▼0.01
Media Library /wp-admin/upload.php1,425 ▲314.23 ▲0.0298.23 ▲1.3343.95 ▲2.81

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 take a closer look at the following
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php on line 5
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-common-fields.php:3
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php on line 5
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-list-addresses.php:15
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php on line 5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php on line 5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/map-to-address/public/partials/woocommerce-delivery-location-customised-fields.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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: woocommerce location picker, google map checkout, map to address

map-to-address/map-to-address.php Passed 13 tests

The principal PHP file in "Map to Address" v. 1.0.14 is loaded by WordPress automatically on each request
93 characters long description:
Customers can mark their location on google map and address will be automatically populated.

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 plugin2,428 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP162789151,142
CSS820156849
JavaScript47731419
Markdown17018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.62
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods3669.23%
▷ Protected methods815.38%
▷ Private methods815.38%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icons/tik.png4.66KB2.53KB▼ 45.68%
public/img/icons/close.png1.40KB0.46KB▼ 67.32%
public/img/icons/location-finder-grey.png2.32KB2.71KB0.00%