10% rampit-world-map

Code Review | Rampit World Map

WordPress plugin Rampit World Map scored 10% from 54 tests.

About plugin

  • Plugin page: rampit-world-map
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 5.8.1
  • First release: Jul 5, 2017
  • Latest release: Jul 8, 2017
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: rampit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 507 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/rampit-world-map/admin/jsps_file_initialisation.php+307
    Undefined variable: decoded_api_key

Server metrics [RAM: ▲0.61MB] [CPU: ▼131.48ms] Passed 4 tests

Server-side resources used by Rampit World Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.06 ▲0.3436.94 ▲17.16
Dashboard /wp-admin3.80 ▲0.7556.80 ▲18.09
Posts /wp-admin/edit.php3.85 ▲0.7450.34 ▲5.31
Add New Post /wp-admin/post-new.php6.10 ▲0.6795.04 ▼552.65
Media Library /wp-admin/upload.php3.68 ▲0.6837.20 ▲4.27
Settings /wp-admin/admin.php?page=jsps_mapsetting3.6330.41
Manage template /wp-admin/admin.php?page=jsps_managetemplate3.6332.45
Add Location /wp-admin/admin.php?page=jsps_addlocation3.6332.04
Dashboard /wp-admin/admin.php?page=rampit_world_map3.6534.74
Manage Map /wp-admin/admin.php?page=jsps_managemap3.6332.13
Manage Location /wp-admin/admin.php?page=jsps_managelocation3.6330.18
Manage category /wp-admin/admin.php?page=jsps_managecategory3.6329.72
Add Map /wp-admin/admin.php?page=jsps_addmap3.6332.01
Add Template /wp-admin/admin.php?page=jsps_setting3.6331.17
Add marker /wp-admin/admin.php?page=jsps_addmarker3.6337.77

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 139 new files
Database: 8 new tables, 1 new option
New tables
wp_jsps_template_skin
wp_jsps_map_setting
wp_jsps_settings
wp_jsps_category
wp_jsps_marker
wp_jsps_category_detail_location
wp_jsps_locations
wp_jsps_map
New WordPress options
jsps_map_location_info

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rampit World Map
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲22317.24 ▲1.8113.41 ▲3.2148.16 ▲1.49
Dashboard /wp-admin3,064 ▲1337.06 ▲1.14136.77 ▼7.27115.84 ▲2.10
Posts /wp-admin/edit.php2,827 ▲882.83 ▲0.1172.54 ▲9.3393.35 ▲10.93
Add New Post /wp-admin/post-new.php1,559 ▼31718.90 ▼0.27359.36 ▼17.52145.69 ▲30.98
Media Library /wp-admin/upload.php1,898 ▲885.76 ▲0.71130.13 ▼8.89121.04 ▲6.72
Settings /wp-admin/admin.php?page=jsps_mapsetting1,2002.9867.4788.35
Manage template /wp-admin/admin.php?page=jsps_managetemplate2,2292.9857.9293.32
Add Location /wp-admin/admin.php?page=jsps_addlocation2,1677.02133.19155.70
Dashboard /wp-admin/admin.php?page=rampit_world_map1,2212.8763.44102.08
Manage Map /wp-admin/admin.php?page=jsps_managemap1,1672.8664.4873.47
Manage Location /wp-admin/admin.php?page=jsps_managelocation1,1902.8665.0176.35
Manage category /wp-admin/admin.php?page=jsps_managecategory1,1622.8668.0465.81
Add Map /wp-admin/admin.php?page=jsps_addmap1,3092.8658.6276.56
Add Template /wp-admin/admin.php?page=jsps_setting2,9186.67140.68150.85
Add marker /wp-admin/admin.php?page=jsps_addmarker1,2322.8660.5675.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% 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/admin.php?page=jsps_mapsetting
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_settings_masters.php+61
    Undefined index: setting_map_api
    • > GET request to /wp-admin/admin.php?page=jsps_mapsetting
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_settings_masters.php+78
    Undefined index: jsps_location_info_page
    • > GET request to /wp-admin/admin.php?page=jsps_mapsetting
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_settings_masters.php+95
    Undefined variable: jsps_setting_map_api
    • > GET request to /wp-admin/admin.php?page=jsps_managetemplate
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_template_masters.php+1621
    Undefined index: Del_TemplateID
    • > GET request to /wp-admin/admin.php?page=jsps_addlocation
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_location_masters.php+58
    Undefined index: Edit_LocationID
    • > GET request to /wp-admin/admin.php?page=jsps_managemap
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_map_masters.php+618
    Undefined index: Del_MapID
    • > GET request to /wp-admin/admin.php?page=jsps_managelocation
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_location_masters.php+1271
    Undefined index: Del_LocationID
    • > GET request to /wp-admin/admin.php?page=jsps_managecategory
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_category_masters.php+486
    Undefined index: Del_Category
    • > GET request to /wp-admin/admin.php?page=jsps_addmap
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_map_masters.php+88
    Undefined index: map_template_id
    • > GET request to /wp-admin/admin.php?page=jsps_addmap
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_map_masters.php+98
    Undefined index: Edit_MapID
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsps_addmap
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_map_masters.php+257
    Undefined variable: Update_Template_id
    • > GET request to /wp-admin/admin.php?page=jsps_setting
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_template_masters.php+53
    Undefined index: Edit_TemplateID
    • > GET request to /wp-admin/admin.php?page=jsps_setting
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_template_masters.php+62
    Undefined index: Copy_TemplateID
    • > GET request to /wp-admin/admin.php?page=jsps_addmarker
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_markers_masters.php+60
    Undefined index: Edit_marker
    • > GET request to /wp-admin/admin.php?page=jsps_addmarker
    • > Notice in wp-content/plugins/rampit-world-map/admin/includes/jsps_markers_masters.php+70
    Undefined index: Del_marker

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsps_addmarker
    • > Network (severe)
    http://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true - Failed to load resource: the server responded with a status of 403 (Forbidden)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsps_setting
    • > Console-api (severe) in unknown
    http://maps.googleapis.com/maps/api/js?key&libraries=places&ver=1.0 82:375 "You are using this API without a key. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors"
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsps_setting
    • > Console-api (severe) in unknown
    http://maps.googleapis.com/maps/api/js?key&libraries=places&ver=1.0 82:375 "InvalidValueError: invalid style feature type: "

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: wp maps, google maps, maps, custom map, custom google map...

rampit-world-map/rampit-world-map.php Passed 13 tests

The entry point to "Rampit World Map" version 0.1.2 is a PHP file that has certain tags in its header comment area
112 characters long description:
Rampit Map Plugin. Eazy to customize Map view, Manage locations with all inforamtion under different categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin6,372 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,5876514,431
CSS392711,694
JavaScript2493247

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
98 compressed PNG files occupy 0.31MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/marker_default_icons/picnic.png1.01KB1.18KB0.00%
images/marker_default_icons/flag.png1.01KB1.26KB0.00%
images/marker_default_icons/restaurant.png0.93KB1.29KB0.00%
css/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
images/marker_default_icons/bus.png1.35KB1.42KB0.00%