66% multiple-address-google-map

Code Review | Google Map Multiple Address

WordPress plugin Google Map Multiple Address scored66%from 54 tests.

About plugin

  • Plugin page: multiple-address-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jul 29, 2017
  • Latest release: Aug 1, 2017
  • Number of updates: 15
  • Update frequency: every 0.3 days
  • Top authors: aliashiquemohammad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /904 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.14MB] [CPU: ▼21.65ms] Passed 4 tests

This is a short check of server-side resources used by Google Map Multiple Address
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0627.12 ▼16.02
Dashboard /wp-admin3.20 ▼0.1031.94 ▼22.74
Posts /wp-admin/edit.php3.28 ▼0.0838.18 ▼14.82
Add New Post /wp-admin/post-new.php5.52 ▼0.3768.37 ▼33.02
Media Library /wp-admin/upload.php3.23 ▼0.0034.32 ▼3.60
Google Map /wp-admin/options-general.php?page=google-map-multiple-address3.1928.84

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Map Multiple Address
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,088 ▲34216.55 ▲2.2512.47 ▲10.6846.04 ▲4.81
Dashboard /wp-admin2,356 ▲1657.21 ▲1.34139.14 ▲33.1439.29 ▼5.82
Posts /wp-admin/edit.php2,259 ▲1663.83 ▲1.8460.60 ▲16.5834.44 ▼3.08
Add New Post /wp-admin/post-new.php1,679 ▲14023.28 ▼0.03642.38 ▲6.3333.43 ▼22.28
Media Library /wp-admin/upload.php1,401 ▲134.92 ▲0.69105.65 ▲0.2747.30 ▲4.18
Google Map /wp-admin/options-general.php?page=google-map-multiple-address1,2926.2888.0337.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=google-map-multiple-address
    • > Notice in wp-content/plugins/multiple-address-google-map/admin/partials/google-map-multiple-address-admin-display.php+257
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/multiple-address-google-map/public/partials/google-map-multiple-address-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multiple-address-google-map/admin/partials/google-map-multiple-address-admin-display.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=google-map-multiple-address
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?sensor=false&ver=1.0.0 210:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/options-general.php?page=google-map-multiple-address
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?sensor=false&ver=1.0.0 128:248 "InvalidValueError: setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lat: NaN is not an accepted value"

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #6 (Dispalying the Map at front-end.)
  • Screenshots: A description for screenshot #5 is missing in multiple-address-google-map/assets to your readme.txt
The official readme.txt is a good inspiration

multiple-address-google-map/google-map-multiple-address.php 85% from 13 tests

The entry point to "Google Map Multiple Address" version 1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("multiple-address-google-map.php" instead of "google-map-multiple-address.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected773 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12235605522
JavaScript25391171
CSS261280

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions4100.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
5 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png54.67KB21.95KB▼ 59.85%
assets/screenshot-3.png30.73KB9.62KB▼ 68.70%
assets/screenshot-2.png23.88KB6.04KB▼ 74.73%
assets/screenshot-1.png25.33KB8.31KB▼ 67.21%
assets/screenshot-4.png104.08KB40.69KB▼ 60.90%