10% wp-map

Code Review | Free Google Maps

WordPress plugin Free Google Maps scored 10% from 53 tests.

About plugin

  • Plugin page: wp-map
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-5.0
  • WordPress version: 5.8.1
  • First release: Dec 12, 2016
  • Latest release: Oct 22, 2018
  • Number of updates: 13
  • Update frequency: every 51.8 days
  • Top authors: agilelogix (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

60+ active / 2,242 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-map/agile-maps.php+36
    Undefined variable: wpdb

Server metrics [RAM: ▲0.31MB] [CPU: ▼263.58ms] Passed 4 tests

A check of server-side resources used by Free Google Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.07 ▲0.3534.36 ▲12.18
Dashboard /wp-admin3.41 ▲0.3640.99 ▲2.95
Posts /wp-admin/edit.php3.46 ▲0.3542.99 ▼0.43
Add New Post /wp-admin/post-new.php5.70 ▲0.2795.34 ▼1,048.14
Media Library /wp-admin/upload.php3.28 ▲0.2831.71 ▼8.70
Manage Categories /wp-admin/admin.php?page=manage-amaps-categories3.2628.95
New Location /wp-admin/admin.php?page=create-amaps3.4331.94
Settings /wp-admin/admin.php?page=amaps-user-settings3.2525.07
Manage Markers /wp-admin/admin.php?page=manage-amaps-markers3.2622.64
Dashboard /wp-admin/admin.php?page=amaps-dashboard3.2632.39
Manage Location /wp-admin/admin.php?page=manage-amaps-location3.2528.94
Edit Location /wp-admin/admin.php?page=edit-amaps-location3.3530.63

Server storage [IO: ▲1.29MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 79 new files
Database: 6 new tables, no new options
New tables
wp_amaps_locations_categories
wp_amaps_locations
wp_amaps_configs
wp_amaps_categories
wp_amaps_markers
wp_amaps_countries

Browser metrics Passed 4 tests

An overview of browser requirements for Free Google Maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,891 ▲28518.39 ▲2.8629.12 ▲21.6345.34 ▼4.85
Dashboard /wp-admin3,031 ▲1787.40 ▲1.53147.11 ▼6.69117.81 ▲15.31
Posts /wp-admin/edit.php2,804 ▲982.98 ▲0.3070.98 ▼0.66102.62 ▲2.55
Add New Post /wp-admin/post-new.php1,666 ▼18722.96 ▲3.83273.20 ▼96.36105.38 ▼0.99
Media Library /wp-admin/upload.php1,870 ▲985.64 ▲0.68130.36 ▼26.75110.31 ▼8.66
Manage Categories /wp-admin/admin.php?page=manage-amaps-categories2,5153.4493.64106.43
New Location /wp-admin/admin.php?page=create-amaps3,4527.07141.03170.53
Settings /wp-admin/admin.php?page=amaps-user-settings1,3143.0164.6284.07
Manage Markers /wp-admin/admin.php?page=manage-amaps-markers1,9463.3787.4395.12
Dashboard /wp-admin/admin.php?page=amaps-dashboard1,3282.9760.4574.29
Manage Location /wp-admin/admin.php?page=manage-amaps-location3,6643.82104.06117.27
Edit Location /wp-admin/admin.php?page=edit-amaps-location9122.4043.1527.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 6 tables
    • wp_amaps_categories
    • wp_amaps_locations_categories
    • wp_amaps_locations
    • wp_amaps_countries
    • wp_amaps_markers
    • wp_amaps_configs

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=amaps-dashboard
    • > Notice in wp-content/plugins/wp-map/admin/partials/dashboard.php+32
    Undefined index: searches

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-map/admin/partials/add_location.php
    • > /wp-content/plugins/wp-map/admin/partials/edit_location.php
    • > /wp-content/plugins/wp-map/admin/partials/markers.php
    • > /wp-content/plugins/wp-map/admin/partials/user_setting.php
    • > /wp-content/plugins/wp-map/admin/partials/dashboard.php
    • > /wp-content/plugins/wp-map/admin/partials/manage_location.php
    • > /wp-content/plugins/wp-map/admin/partials/categories.php
    • > /wp-content/plugins/wp-map/includes/output-template.php
  • 68× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: countries in wp-content/plugins/wp-map/admin/partials/edit_location.php on line 75
    • > PHP Notice
      Undefined variable: location in wp-content/plugins/wp-map/admin/partials/edit_location.php on line 45
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-map/admin/partials/dashboard.php on line 14
    • > PHP Warning
      Use of undefined constant AGILE_MAPS_URL_PATH - assumed 'AGILE_MAPS_URL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-map/admin/partials/edit_location.php on line 174
    • > PHP Notice
      Trying to get property 'postal_code' of non-object in wp-content/plugins/wp-map/admin/partials/edit_location.php on line 69
    • > PHP Notice
      Trying to get property 'lng' of non-object in wp-content/plugins/wp-map/admin/partials/edit_location.php on line 88
    • > PHP Notice
      Undefined variable: all_stats in wp-content/plugins/wp-map/admin/partials/dashboard.php on line 20
    • > PHP Notice
      Undefined variable: category in wp-content/plugins/wp-map/admin/partials/add_location.php on line 113
    • > PHP Notice
      Undefined variable: all_stats in wp-content/plugins/wp-map/admin/partials/dashboard.php on line 14
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-map/admin/partials/edit_location.php on line 75

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit-amaps-location
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-map/admin/js/jquery.fileupload.min.js?ver=1.0.0 15:993 Uncaught TypeError: e.widget is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-amaps-markers
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-map/admin/js/jscript.js?ver=1.0.0 157:8 Uncaught TypeError: $form.fileupload is not a function
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/default.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/train-station.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/restuarant.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/night%20club.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/spa.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/local%20government.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/car%20repair.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/pet%20store.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/electronics%20store.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=manage-amaps-categories
    • > Network (severe)
    wp-content/plugins/wp-map/public/svg/gym.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: google map, google maps, wordpress google maps, map, wordpress google map...

wp-map/agile-maps.php 77% from 13 tests

Analyzing the main PHP file in "Free Google Maps" version 1.0.1
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-map.php" instead of "agile-maps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin5,466 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS10661042,134
PHP197857032,051
JavaScript8312133993
SVG100288

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity19.75
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods59
▷ Static methods610.17%
▷ Public methods5491.53%
▷ Protected methods00.00%
▷ Private methods58.47%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
29 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
public/datatable/media/images/forward_disabled.png1.33KB0.58KB▼ 56.42%
public/img/close_0.png3.28KB0.75KB▼ 77.16%
admin/images/searches.png32.93KB12.41KB▼ 62.30%
public/datatable/media/images/sort_desc_disabled.png1.02KB0.25KB▼ 75.98%