84% responsive-google-map

Code Review | Responsive Google Map

WordPress plugin Responsive Google Map scored84%from 54 tests.

About plugin

  • Plugin page: responsive-google...
  • Plugin version: 3.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Apr 14, 2014
  • Latest release: Sep 18, 2022
  • Number of updates: 52
  • Update frequency: every 59.2 days
  • Top authors: jogesh_pi (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

900+ active /27,148 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
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▲0.38ms] Passed 4 tests

This is a short check of server-side resources used by Responsive Google Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.71 ▲1.06
Dashboard /wp-admin3.60 ▲0.3064.52 ▲1.64
Posts /wp-admin/edit.php3.65 ▲0.2966.13 ▲13.49
Add New Post /wp-admin/post-new.php6.12 ▲0.2493.62 ▼8.17
Media Library /wp-admin/upload.php3.46 ▲0.2343.95 ▲7.01
All Maps /wp-admin/edit.php?post_type=wrg_rgm3.6145.71
Add New /wp-admin/post-new.php?post_type=wrg_rgm3.5356.19
Settings /wp-admin/edit.php?post_type=wrg_rgm&page=wrg_rgm_settings3.4340.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Google Map
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲5314.03 ▼0.7026.54 ▲24.5440.17 ▼2.63
Dashboard /wp-admin2,238 ▲675.63 ▲0.1299.23 ▲11.2945.78 ▲7.77
Posts /wp-admin/edit.php2,144 ▲441.97 ▼0.0540.83 ▼1.5338.76 ▼0.71
Add New Post /wp-admin/post-new.php1,573 ▲3818.52 ▲0.17643.33 ▼47.8767.98 ▼13.34
Media Library /wp-admin/upload.php1,443 ▲434.24 ▲0.0399.92 ▼1.2144.41 ▲3.03
All Maps /wp-admin/edit.php?post_type=wrg_rgm1,3885.2079.6531.24
Add New /wp-admin/post-new.php?post_type=wrg_rgm2,14210.92215.8564.56
Settings /wp-admin/edit.php?post_type=wrg_rgm&page=wrg_rgm_settings8472.0529.4428.70

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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • wrg_rgm_review
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_wrgrgm_map_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=wrg_rgm
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyBeT8Tw1yb4ii5Vm6B3Z3NSbkCRMsLScNI&libraries=places 235: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/post-new.php?post_type=wrg_rgm
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyBeT8Tw1yb4ii5Vm6B3Z3NSbkCRMsLScNI&libraries=places 153:248 "Google Maps JavaScript API error: RefererNotAllowedMapError\nhttps://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error\nYour site URL to be authorized: /wp-admin/post-new.php"
    • > GET request to /wp-admin/post-new.php?post_type=wrg_rgm
    • > Javascript (severe) in unknown
    https://maps.googleapis.com/maps-api-v3/api/js/54/10/map.js 1:207 Uncaught TypeError: Cannot read properties of undefined (reading 'hasAttribute')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: google map styles, wordpress google map, responsive map, google map, wordpress map...

responsive-google-map/responsive-google-map.php 85% from 13 tests

The main file in "Responsive Google Map" v. 3.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 197 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,134 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP183632461,126
JavaScript20448

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.65
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes211.76%
Methods80
▷ Static methods1923.75%
▷ Public methods6581.25%
▷ Protected methods11.25%
▷ Private methods1417.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/map-styles/dark.png11.59KB3.63KB▼ 68.72%
images/map-styles/dark-electric.png23.28KB6.92KB▼ 70.30%
images/map-styles/aubergine.png40.29KB11.85KB▼ 70.59%
images/map-styles/light-blue.png21.80KB6.87KB▼ 68.50%
images/map-styles/grayscale.png12.63KB3.78KB▼ 70.07%