56% gboy-custom-google-map

Code Review | Gboy Custom Google Map

WordPress plugin Gboy Custom Google Map scored56%from 54 tests.

About plugin

  • Plugin page: gboy-custom-googl...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1+
  • WordPress version: 6.3.1
  • First release: Sep 20, 2017
  • Latest release: Sep 21, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: gopalkumar315 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /564 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Gboy Custom Google Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.74 ▼1.81
Dashboard /wp-admin3.32 ▼0.0242.78 ▼38.74
Posts /wp-admin/edit.php3.37 ▲0.0243.03 ▼7.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.99 ▼13.48
Media Library /wp-admin/upload.php3.25 ▲0.0237.57 ▲2.87
/wp-admin/admin.php?page=gm_edit3.2734.86
Setting /wp-admin/admin.php?page=gm_setting3.2429.26
List /wp-admin/admin.php?page=gm_list3.2530.00
/wp-admin/admin.php?page=gm_add3.1926.88
/wp-admin/admin.php?page=gm_duplicate3.1929.37

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_gbgm_list
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Gboy Custom Google Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.15 ▼1.511.64 ▼0.0241.44 ▲4.66
Dashboard /wp-admin2,229 ▲415.03 ▲0.13100.40 ▼11.7339.84 ▼3.04
Posts /wp-admin/edit.php2,112 ▲201.99 ▼0.0633.88 ▼6.5632.03 ▼3.17
Add New Post /wp-admin/post-new.php1,533 ▼917.53 ▼0.78674.08 ▲68.0753.89 ▼9.34
Media Library /wp-admin/upload.php1,408 ▲174.21 ▼0.04130.23 ▲20.9756.71 ▲10.63
/wp-admin/admin.php?page=gm_edit1,0922.0224.4428.29
Setting /wp-admin/admin.php?page=gm_setting7962.0624.3222.30
List /wp-admin/admin.php?page=gm_list8642.2334.2125.56
/wp-admin/admin.php?page=gm_add1,0952.0224.7926.20
/wp-admin/admin.php?page=gm_duplicate7841.9921.5921.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_gbgm_list
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 80 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+118
    Undefined variable: mapData
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+55
    Trying to get property 'title' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+59
    Trying to get property 'latitude' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+63
    Trying to get property 'longitude' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+67
    Trying to get property 'address' of non-object
  • 44 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+73
    Trying to get property 'style' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+79
    Trying to get property 'custom_style' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+87
    Trying to get property 'map_type' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+92
    Trying to get property 'zoom' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+96
    Trying to get property 'height' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+102
    Trying to get property 'scroll' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+107
    Trying to get property 'icon' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_add
    • > Notice in wp-content/plugins/gboy-custom-google-map/templates/add.php+114
    Trying to get property 'status' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gm_duplicate
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gboy-custom-google-map/templates/map.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/gboy-custom-google-map/templates/list.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gboy-custom-google-map/templates/setting.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/gboy-custom-google-map/templates/add.php:51
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/gboy-custom-google-map/templates/list.php on line 14
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/gboy-custom-google-map/templates/add.php on line 15

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=gm_list
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot set properties of undefined (setting '_DT_CellIndex')" "TypeError: Cannot set properties of undefined (setting '_DT_CellIndex')\n at Ja (/wp-content/plugins/gboy-custom-google-map/js/datatable.min.js?ver=1.1:27:267)\n at N (/wp-content/plugins/gboy-custom-google-map/js/datatable.min.js?ver=1.1:19:337)\n at HTMLTableRowElement.\u003Canonymous> (/wp-content/plugins/gboy-custom-google-map/js/datatable.min.js?ver=1.1:19:450)\n at /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1681\n at Function.map (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3967)\n at e.\u003Ccomputed>.map (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1649)\n at oa (/wp-content/plugins/gboy-custom-google-map/js/datatable.min.js?ver=1.1:19:415)\n at e (/wp-content/plugins/gboy-custom-google-map/js/datatable.min.js?ver=1.1:95:451)\n at HTMLTableElement.\u003Canonymous> (/wp-content/plugins/gboy-custom-google-map/js/datatable.min.js?ver=1.1:96:138)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)" undefined
    • > GET request to /wp-admin/admin.php?page=gm_list
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot set properties of undefined (setting '_DT_CellIndex')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: stylish google map, wp google map plugin, wp google map, custom google map, google map...

gboy-custom-google-map/gboy-googlemap.php 85% from 13 tests

The main PHP script in "Gboy Custom Google Map" version 1.2 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gboy-custom-google-map.php" instead of "gboy-googlemap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected583 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP581133419
JavaScript107163
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
No PNG files were detected