63% gmap-point-list

Code Review | Gmap Point List

WordPress plugin Gmap Point List scored63%from 54 tests.

About plugin

  • Plugin page: gmap-point-list
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Feb 5, 2014
  • Latest release: May 7, 2016
  • Number of updates: 17
  • Update frequency: every 48.5 days
  • Top authors: Rafel.sanso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,181 total downloads

Benchmarks

Plugin footprint 65% 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.09MB] [CPU: ▼40.86ms] Passed 4 tests

This is a short check of server-side resources used by Gmap Point List
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2036.01 ▼0.99
Dashboard /wp-admin2.85 ▼0.4517.81 ▼26.97
Posts /wp-admin/edit.php2.85 ▼0.5015.83 ▼29.83
Add New Post /wp-admin/post-new.php2.85 ▼3.0417.51 ▼88.54
Media Library /wp-admin/upload.php2.85 ▼0.3814.83 ▼18.08
Markers /wp-admin/edit.php?post_type=marker2.8515.53
New marker /wp-admin/post-new.php?post_type=marker2.8516.82
Map List /wp-admin/edit.php?post_type=marker&page=gmap-point-list2.8515.39

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

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

Browser metrics Passed 4 tests

Gmap Point List: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.30 ▼1.144.11 ▲2.4141.57 ▲1.51
Dashboard /wp-admin2,239 ▲535.84 ▲0.8895.03 ▼11.8380.68 ▲40.53
Posts /wp-admin/edit.php2,122 ▲332.00 ▲0.0435.87 ▼2.7132.06 ▼9.51
Add New Post /wp-admin/post-new.php1,580 ▲5223.37 ▲5.08669.83 ▲45.27136.62 ▲83.06
Media Library /wp-admin/upload.php1,418 ▲304.26 ▲0.0599.91 ▼0.5378.44 ▲36.70
Markers /wp-admin/edit.php?post_type=marker1,0801.9634.9339.48
New marker /wp-admin/post-new.php?post_type=marker2,5179.86298.44225.71
Map List /wp-admin/edit.php?post_type=marker&page=gmap-point-list8901.7024.2526.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=marker&page=gmap-point-list
    • > User notice in wp-includes/functions.php+5905
    Function wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Notice in wp-content/plugins/gmap-point-list/gmap-point-list.php+87
    Undefined index: _wpg__map_latitude
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Notice in wp-content/plugins/gmap-point-list/gmap-point-list.php+91
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Notice in wp-content/plugins/gmap-point-list/gmap-point-list.php+91
    Undefined index: _wpg__map_longitude
    • > GET request to /wp-admin/edit.php?post_type=marker&page=gmap-point-list
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=marker&page=gmap-point-list
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/gmap-point-list/init.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gmap-point-list/gmap-point-list.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places 234: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=marker
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places 163:311 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/gmap-point-list/js/cmb.js?ver=0.9.1:72:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: marker list, map, google maps, multiple marker

gmap-point-list/gmap-point-list.php Passed 13 tests

The principal PHP file in "Gmap Point List" v. 1.1.2 is loaded by WordPress automatically on each request
117 characters long description:
Plugin for create your own markers on Google Maps, as a Custom Type posts, and with an easy integration on your page.

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
Good job! No executable or dangerous file extensions detected2,239 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP21611461,001
JavaScript6191611830
CSS1219316
XML20047
HTML19045

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity78.00
▷ Minimum class complexity2.00
▷ Maximum class complexity154.00
Average method complexity20.25
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
images/mappointer.png1.30KB0.33KB▼ 74.66%
images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%