88% multiple-location-google-map

Code Review | Multiple Location Google Map

WordPress plugin Multiple Location Google Map scored 88% from 54 tests.

About plugin

  • Plugin page: multiple-location...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 5.8.1
  • First release: Jul 8, 2016
  • Latest release: Jan 21, 2017
  • Number of updates: 11
  • Update frequency: every 18.1 days
  • Top authors: Ydesignservices (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active / 11,845 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼141.05ms] Passed 4 tests

An overview of server-side resources used by Multiple Location Google Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.0334.31 ▼2.96
Dashboard /wp-admin3.11 ▲0.0555.34 ▲13.53
Posts /wp-admin/edit.php3.16 ▲0.0544.51 ▼0.26
Add New Post /wp-admin/post-new.php5.47 ▲0.0493.66 ▼559.40
Media Library /wp-admin/upload.php3.05 ▲0.0536.30 ▼1.59
All Location /wp-admin/edit.php?post_type=mlgm3.0928.23
Settings /wp-admin/edit.php?post_type=mlgm&page=mlgmsetting3.0226.61
Add New /wp-admin/post-new.php?post_type=mlgm3.1546.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Multiple Location Google Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲18916.21 ▲0.188.97 ▼0.7844.93 ▼4.17
Dashboard /wp-admin3,048 ▲1116.58 ▲0.35137.79 ▼22.29104.23 ▼3.36
Posts /wp-admin/edit.php2,814 ▲753.02 ▲0.3171.71 ▲2.3698.84 ▲12.67
Add New Post /wp-admin/post-new.php1,736 ▲5318.54 ▼0.19360.19 ▼30.46124.24 ▲17.71
Media Library /wp-admin/upload.php1,897 ▲905.43 ▲0.37149.31 ▲0.20114.60 ▼11.96
All Location /wp-admin/edit.php?post_type=mlgm1,4812.9363.9073.21
Settings /wp-admin/edit.php?post_type=mlgm&page=mlgmsetting1,3012.5965.9878.69
Add New /wp-admin/post-new.php?post_type=mlgm2,9759.22217.65137.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=mlgm&page=mlgmsetting
    • > Notice in wp-content/plugins/multiple-location-google-map/includes/admin/settings.php+6
    Undefined variable: tabactivestyleClass
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mlgm&page=mlgmsetting
    • > Notice in wp-content/plugins/multiple-location-google-map/includes/admin/setting/manage_maps.php+71
    Trying to access array offset on value of type null

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/multiple-location-google-map/includes/admin/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multiple-location-google-map/includes/admin/installation.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multiple-location-google-map/includes/admin/setting/manage_maps.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multiple-location-google-map/includes/admin/setting/manage_style.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

multiple-location-google-map/multiple-location-google-map.php 92% from 13 tests

The main file in "Multiple Location Google Map" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected2,125 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,281521,191
PHP149443729
JavaScript43310205

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes6100.00%
Methods28
▷ Static methods00.00%
▷ Public methods2485.71%
▷ Protected methods00.00%
▷ Private methods414.29%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/images/location_icon_0001_Layer-9.png1.84KB1.03KB▼ 43.78%
Latest/multiple-location-google-map/asset/images/location_icon_0002_Layer-8.png1.54KB0.70KB▼ 54.34%
asset/images/location_icon_0009_Layer-1.png1.62KB0.60KB▼ 63.30%
Latest/multiple-location-google-map/asset/images/location_icon_0007_Layer-3.png1.35KB0.72KB▼ 46.61%
Latest/multiple-location-google-map/asset/images/location_icon_0000_Layer-10.png1.46KB0.75KB▼ 48.69%