52% wp-responsive-google-map

Code Review | Wordpress responsive google map

WordPress plugin Wordpress responsive google map scored52%from 54 tests.

About plugin

  • Plugin page: wp-responsive-goo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1
  • WordPress version: 6.3.1
  • First release: Aug 30, 2017
  • Latest release: May 29, 2019
  • Number of updates: 4
  • Update frequency: every 159.0 days
  • Top authors: softas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /765 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.51MB] [CPU: ▼47.37ms] Passed 4 tests

An overview of server-side resources used by Wordpress responsive google map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.49 ▼0.9811.48 ▼31.13
Dashboard /wp-admin2.50 ▼0.8012.65 ▼38.28
Posts /wp-admin/edit.php2.50 ▼0.8613.64 ▼35.05
Add New Post /wp-admin/post-new.php2.50 ▼3.3911.99 ▼85.02
Media Library /wp-admin/upload.php2.50 ▼0.7324.08 ▼18.91
Google Maps /wp-admin/admin.php?page=rgm_view_overview2.5011.96
Locations /wp-admin/admin.php?page=rgm_manage_location2.5015.96
Add Location /wp-admin/admin.php?page=rgm_form_location2.5012.92
Settings /wp-admin/admin.php?page=rgm_manage_settings2.5010.78
Docs /wp-admin/admin.php?page=rgm_view_docs2.5012.22

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: 1 new table, 6 new options
New tables
wp_rgm_map_locations
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress responsive google map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.55 ▼0.675.36 ▲3.8145.41 ▲4.09
Dashboard /wp-admin2,225 ▲345.79 ▲0.89158.97 ▲51.9482.68 ▲37.15
Posts /wp-admin/edit.php2,129 ▲402.02 ▲0.0238.49 ▼5.2832.46 ▼11.93
Add New Post /wp-admin/post-new.php1,694 ▲16122.03 ▼0.88676.95 ▲2.3463.42 ▲4.45
Media Library /wp-admin/upload.php1,422 ▲314.21 ▼0.02102.54 ▼7.7289.93 ▲43.15
Google Maps /wp-admin/admin.php?page=rgm_view_overview8472.0231.7330.91
Locations /wp-admin/admin.php?page=rgm_manage_location1,0192.0629.5234.36
Add Location /wp-admin/admin.php?page=rgm_form_location9022.0226.3728.29
Settings /wp-admin/admin.php?page=rgm_manage_settings1,2872.1528.5429.37
Docs /wp-admin/admin.php?page=rgm_view_docs8712.0125.6028.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'NOResponsiveGoogleMaps' does not have a method 'wpgmp_google_map_widget'
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_rgm_map_locations
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rgm_view_docs
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'NOResponsiveGoogleMaps' does not have a method 'wpgmp_google_map_widget'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rgm_view_docs
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rgm_view_docs
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 40 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rgm_view_docs
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rgm_view_docs
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rgm_manage_settings
    • > Notice in wp-content/plugins/wp-responsive-google-map/inc/modules/settings/views/manage.php+14
    Undefined variable: response
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rgm_manage_settings
    • > Notice in wp-content/plugins/wp-responsive-google-map/inc/modules/settings/views/manage.php+14
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=rgm_manage_location
    • > Notice in wp-content/plugins/wp-responsive-google-map/inc/classes/rgm_wp_list_table.php+484
    Undefined index: s

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-responsive-google-map/wp-responsive-google-map.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-responsive-google-map/inc/modules/location/views/form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-responsive-google-map/inc/modules/location/views/manage.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-responsive-google-map/inc/modules/overview/views/view.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-responsive-google-map/inc/classes/rgm_wp_list_table.php on line 9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-responsive-google-map/inc/classes/rgm_wp_list_table.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-responsive-google-map/inc/modules/docs/views/view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-responsive-google-map/inc/modules/settings/views/manage.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-responsive-google-map/inc/classes/rgm_wp_list_table.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

wp-responsive-google-map/wp-responsive-google-map.php Passed 13 tests

The primary PHP file in "Wordpress responsive google map" version 1.0.0 is used by WordPress to initiate all plugin functionality
127 characters long description:
A Responsive Google Maps plugin to display custom markers on the google maps. Show custom message with links on a marker click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,388 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP122832531,239
JavaScript125595
CSS18054

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity23.88
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods54
▷ Static methods814.81%
▷ Public methods4888.89%
▷ Protected methods35.56%
▷ Private methods35.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1392.86%
▷ Class constants17.14%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/marker.png1.05KB1.18KB0.00%
assets/images/rgm.png0.81KB0.73KB▼ 10.70%