61% gmo-google-map

Code Review | Plugin Name: GMO Google Map

WordPress plugin Plugin Name: GMO Google Map scored61%from 54 tests.

About plugin

  • Plugin page: gmo-google-map
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Oct 10, 2014
  • Latest release: Jan 29, 2016
  • Number of updates: 23
  • Update frequency: every 41.3 days
  • Top authors: Takeaki Nagashima (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,292 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.97MB] [CPU: ▼37.64ms] Passed 4 tests

Server-side resources used by Plugin Name: GMO Google Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.26 ▼1.69
Dashboard /wp-admin3.00 ▼0.3126.80 ▼24.44
Posts /wp-admin/edit.php3.00 ▼0.4424.11 ▼49.39
Add New Post /wp-admin/post-new.php3.00 ▼2.8923.27 ▼65.13
Media Library /wp-admin/upload.php3.00 ▼0.2320.32 ▼11.59
GMO Google Map /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php3.0023.38

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: GMO Google Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.70 ▼0.231.75 ▲0.1043.45 ▼0.47
Dashboard /wp-admin2,207 ▲165.83 ▼0.05100.53 ▼8.3436.21 ▼7.55
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0239.57 ▲0.3035.57 ▲0.26
Add New Post /wp-admin/post-new.php1,522 ▼1523.31 ▲0.20690.61 ▲12.4854.27 ▲0.91
Media Library /wp-admin/upload.php1,392 ▲104.21 ▼0.0399.05 ▼1.2146.26 ▲2.92
GMO Google Map /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php9192.0124.6354.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% 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 errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Notice in wp-content/plugins/gmo-google-map/includes/admin.php+38
    Undefined index: input_Address
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Notice in wp-content/plugins/gmo-google-map/includes/admin.php+39
    Undefined index: input_Width
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Notice in wp-content/plugins/gmo-google-map/gmo-google-map.php+53
    Undefined index: input_Heignt
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Notice in wp-content/plugins/gmo-google-map/includes/admin.php+41
    Undefined index: input_Zoom
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Notice in wp-content/plugins/gmo-google-map/includes/admin.php+42
    Undefined index: input_Breakpoint
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Notice in wp-content/plugins/gmo-google-map/includes/admin.php+40
    Undefined index: input_Height

SRP 50% from 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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gmo-google-map/gmo-google-map.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gmo-google-map/includes/admin.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Network (severe)
    wp-content/plugins/gmo-google-map/css/gmo-admin-plugin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Network (severe)
    wp-content/plugins/gmo-google-map/images/bnr_themes.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Network (severe)
    wp-content/plugins/gmo-google-map/images/bnr_plugins.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=gmo-google-map/gmo-google-map.php
    • > Network (severe)
    wp-content/plugins/gmo-google-map/images/logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Plugin Name: GMO Google Map === )
Please take inspiration from this readme.txt

gmo-google-map/gmo-google-map.php 69% from 13 tests

Analyzing the main PHP file in "Plugin Name: GMO Google Map" version 1.2
It is important to fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")
  • Domain Path: Please prefix the domain path with a forward slash character ("/")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 249 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Everything looks great! No dangerous files found in this plugin2,009 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4408571,734
PHP23913215
CSS18036
JSON10024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.19MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wpcloud_bnr_themes.png8.66KB3.83KB▼ 55.75%
images/wpcloud_bnr_plugins.png9.14KB4.07KB▼ 55.50%
images/wpcloud_logo.png4.90KB2.99KB▼ 39.04%
images/ico_link.png1.00KB0.21KB▼ 79.07%
images/wpshop_logo.png7.22KB5.91KB▼ 18.12%