WP Statistics - Version 13.1.6

Version Description

= 13.0 = IMPORTANT NOTE Welcome to WP-Statistics v13.0, our biggest update! Thank you for being part of our community. Weve been working hard for one year to develop this version and make WP-Statistics better for you. Before updating, make sure you disabled all your add-ons, then after that, try to update add-ons.

If you encounter any bug, please create an issue on Github where we can act upon them more efficiently. Since Github is not a support forum, just bugs are welcomed, and any other request will be closed.

Download this release

Release Info

Developer mostafa.s1990
Plugin Icon 128x128 WP Statistics
Version 13.1.6
Comparing to
See all releases

Code changes from version 13.1.5 to 13.1.6

includes/admin/class-wp-statistics-admin-template.php CHANGED
@@ -241,7 +241,7 @@ class Admin_Template
241
  }
242
 
243
  // Push To list
244
- $list[$number_days] = array('title' => $title, 'link' => $link, 'active' => $active);
245
  }
246
 
247
  return array('list' => $list, 'from' => reset($RequestDateKeys), 'to' => end($RequestDateKeys));
241
  }
242
 
243
  // Push To list
244
+ $list[$number_days] = array('title' => $title, 'link' => sanitize_url($link), 'active' => $active);
245
  }
246
 
247
  return array('list' => $list, 'from' => reset($RequestDateKeys), 'to' => end($RequestDateKeys));
includes/admin/meta-box/wp-statistics-meta-box-platforms.php CHANGED
@@ -84,7 +84,7 @@ class platforms
84
  if (trim($l['platform']) != "") {
85
 
86
  // Sanitize Version name
87
- $lists_name[] = $l['platform'];
88
 
89
  // Get List Count
90
  $lists_value[] = (int)$l['count'];
84
  if (trim($l['platform']) != "") {
85
 
86
  // Sanitize Version name
87
+ $lists_name[] = sanitize_text_field($l['platform']);
88
 
89
  // Get List Count
90
  $lists_value[] = (int)$l['count'];
includes/admin/templates/optimization/purging.php CHANGED
@@ -218,8 +218,7 @@
218
  </select>
219
 
220
  <p class="description"><?php _e('All data table will be lost.', 'wp-statistics'); ?></p>
221
- <input id="empty-table-submit" class="button button-primary" type="submit" value="<?php _e('Clear now!',
222
- 'wp-statistics'); ?>" name="empty-table-submit" Onclick="return false;"/>
223
  <span id="empty-status"></span>
224
  <div id="empty-result"></div>
225
  </td>
@@ -234,10 +233,8 @@
234
  <input type="text" class="small-text code" id="purge-data" name="wps_purge_data" value="365"/>
235
  <label for="purge-data"><?php _e('Days', 'wp-statistics'); ?></label>
236
 
237
- <p class="description"><?php echo __('Delete user statistics data older than the selected number of days.',
238
- 'wp-statistics') . ' ' . __('Minimum value is 30 days.', 'wp-statistics'); ?></p>
239
- <input id="purge-data-submit" class="button button-primary" type="submit" value="<?php _e('Purge now!',
240
- 'wp-statistics'); ?>" name="purge-data-submit" Onclick="return false;"/>
241
  <span id="purge-data-status"></span>
242
  <div id="purge-data-result"></div>
243
  </td>
@@ -253,12 +250,8 @@
253
  <input type="text" class="small-text code" id="purge-visitor-hits" name="wps_purge_visitor_hits" value="10"/>
254
  <label for="purge-visitor-hits"><?php _e('Hits', 'wp-statistics'); ?></label>
255
 
256
- <p class="description"><?php echo __('Delete user statistics data where the user has more than the defined number of hits in a day.',
257
- 'wp-statistics') . ' ' . __('This can be useful to clear up old data when your site has been hit by a bot.',
258
- 'wp-statistics') . ' ' . __('This will remove the visitor and their hits to the site, however it will not remove individual page hits as that data is not recorded on a per use basis.',
259
- 'wp-statistics') . ' ' . __('Minimum value is 10 hits.', 'wp-statistics'); ?></p>
260
- <input id="purge-visitor-hits-submit" class="button button-primary" type="submit" value="<?php _e('Purge now!',
261
- 'wp-statistics'); ?>" name="purge-visitor-hits-submit" Onclick="return false;"/>
262
  <span id="purge-visitor-hits-status"></span>
263
  <div id="purge-visitor-hits-result"></div>
264
  </td>
@@ -290,10 +283,8 @@
290
  ?>
291
  </select>
292
 
293
- <p class="description"><?php _e('All visitor data will be lost for this agent type.',
294
- 'wp-statistics'); ?></p>
295
- <input id="delete-agents-submit" class="button button-primary" type="submit" value="<?php _e('Delete now!',
296
- 'wp-statistics'); ?>" name="delete-agents-submit" Onclick="return false;">
297
  <span id="delete-agents-status"></span>
298
  <div id="delete-agents-result"></div>
299
  </td>
@@ -318,10 +309,8 @@
318
  ?>
319
  </select>
320
 
321
- <p class="description"><?php _e('All visitor data will be lost for this platform type.',
322
- 'wp-statistics'); ?></p>
323
- <input id="delete-platforms-submit" class="button button-primary" type="submit" value="<?php _e('Delete now!',
324
- 'wp-statistics'); ?>" name="delete-platforms-submit" Onclick="return false;">
325
  <span id="delete-platforms-status"></span>
326
  <div id="delete-platforms-result"></div>
327
  </td>
@@ -335,10 +324,8 @@
335
  <td>
336
  <input dir="ltr" id="delete-ip" type="text" name="delete-ip"/>
337
 
338
- <p class="description"><?php _e('All visitor data will be lost for this IP.',
339
- 'wp-statistics'); ?></p>
340
- <input id="delete-ip-submit" class="button button-primary" type="submit" value="<?php _e('Delete now!',
341
- 'wp-statistics'); ?>" name="delete-ip-submit" Onclick="return false;">
342
  <span id="delete-ip-status"></span>
343
  <div id="delete-ip-result"></div>
344
  </td>
218
  </select>
219
 
220
  <p class="description"><?php _e('All data table will be lost.', 'wp-statistics'); ?></p>
221
+ <input id="empty-table-submit" class="button button-primary" type="submit" value="<?php _e('Clear now!', 'wp-statistics'); ?>" name="empty-table-submit" Onclick="return false;"/>
 
222
  <span id="empty-status"></span>
223
  <div id="empty-result"></div>
224
  </td>
233
  <input type="text" class="small-text code" id="purge-data" name="wps_purge_data" value="365"/>
234
  <label for="purge-data"><?php _e('Days', 'wp-statistics'); ?></label>
235
 
236
+ <p class="description"><?php echo __('Delete user statistics data older than the selected number of days.', 'wp-statistics') . ' ' . __('Minimum value is 30 days.', 'wp-statistics'); ?></p>
237
+ <input id="purge-data-submit" class="button button-primary" type="submit" value="<?php _e('Purge now!', 'wp-statistics'); ?>" name="purge-data-submit" Onclick="return false;"/>
 
 
238
  <span id="purge-data-status"></span>
239
  <div id="purge-data-result"></div>
240
  </td>
250
  <input type="text" class="small-text code" id="purge-visitor-hits" name="wps_purge_visitor_hits" value="10"/>
251
  <label for="purge-visitor-hits"><?php _e('Hits', 'wp-statistics'); ?></label>
252
 
253
+ <p class="description"><?php echo __('Delete user statistics data where the user has more than the defined number of hits in a day.', 'wp-statistics') . ' ' . __('This can be useful to clear up old data when your site has been hit by a bot.', 'wp-statistics') . ' ' . __('This will remove the visitor and their hits to the site, however it will not remove individual page hits as that data is not recorded on a per use basis.', 'wp-statistics') . ' ' . __('Minimum value is 10 hits.', 'wp-statistics'); ?></p>
254
+ <input id="purge-visitor-hits-submit" class="button button-primary" type="submit" value="<?php _e('Purge now!', 'wp-statistics'); ?>" name="purge-visitor-hits-submit" Onclick="return false;"/>
 
 
 
 
255
  <span id="purge-visitor-hits-status"></span>
256
  <div id="purge-visitor-hits-result"></div>
257
  </td>
283
  ?>
284
  </select>
285
 
286
+ <p class="description"><?php _e('All visitor data will be lost for this agent type.', 'wp-statistics'); ?></p>
287
+ <input id="delete-agents-submit" class="button button-primary" type="submit" value="<?php _e('Delete now!', 'wp-statistics'); ?>" name="delete-agents-submit" Onclick="return false;">
 
 
288
  <span id="delete-agents-status"></span>
289
  <div id="delete-agents-result"></div>
290
  </td>
309
  ?>
310
  </select>
311
 
312
+ <p class="description"><?php _e('All visitor data will be lost for this platform type.', 'wp-statistics'); ?></p>
313
+ <input id="delete-platforms-submit" class="button button-primary" type="submit" value="<?php _e('Delete now!', 'wp-statistics'); ?>" name="delete-platforms-submit" Onclick="return false;">
 
 
314
  <span id="delete-platforms-status"></span>
315
  <div id="delete-platforms-result"></div>
316
  </td>
324
  <td>
325
  <input dir="ltr" id="delete-ip" type="text" name="delete-ip"/>
326
 
327
+ <p class="description"><?php _e('All visitor data will be lost for this IP.', 'wp-statistics'); ?></p>
328
+ <input id="delete-ip-submit" class="button button-primary" type="submit" value="<?php _e('Delete now!', 'wp-statistics'); ?>" name="delete-ip-submit" Onclick="return false;">
 
 
329
  <span id="delete-ip-status"></span>
330
  <div id="delete-ip-result"></div>
331
  </td>
includes/admin/templates/pages/refer.url.php CHANGED
@@ -4,7 +4,7 @@
4
  </li>
5
  |
6
  <li>
7
- <a class="current" href="<?php echo add_query_arg(array('referrer' => $args['domain'])); ?>">
8
  <?php echo $args['domain']; ?>
9
  <span class="count">(<?php echo number_format_i18n($total); ?>)</span>
10
  </a>
4
  </li>
5
  |
6
  <li>
7
+ <a class="current" href="<?php echo esc_url(add_query_arg(array('referrer' => $args['domain']))); ?>">
8
  <?php echo $args['domain']; ?>
9
  <span class="count">(<?php echo number_format_i18n($total); ?>)</span>
10
  </a>
includes/admin/templates/pages/visitors.php CHANGED
@@ -30,7 +30,7 @@
30
  <td><?php _e('City', 'wp-statistics'); ?></td>
31
  <?php } ?>
32
  <td>
33
- <a href="<?php echo add_query_arg('order', ((isset($_GET['order']) and $_GET['order'] == "asc") ? 'desc' : 'asc')); ?>">
34
  <?php _e('Date', 'wp-statistics'); ?>
35
  <span class="dashicons dashicons-arrow-<?php echo((isset($_GET['order']) and $_GET['order'] == "asc") ? 'up' : 'down'); ?>"></span>
36
  </a>
30
  <td><?php _e('City', 'wp-statistics'); ?></td>
31
  <?php } ?>
32
  <td>
33
+ <a href="<?php echo esc_url( add_query_arg('order', ((isset($_GET['order']) and $_GET['order'] == "asc") ? 'desc' : 'asc'))); ?>">
34
  <?php _e('Date', 'wp-statistics'); ?>
35
  <span class="dashicons dashicons-arrow-<?php echo((isset($_GET['order']) and $_GET['order'] == "asc") ? 'up' : 'down'); ?>"></span>
36
  </a>
includes/api/v2/class-wp-statistics-api-hit.php CHANGED
@@ -35,14 +35,15 @@ class Hit extends \WP_STATISTICS\RestAPI
35
  public static function require_params_hit()
36
  {
37
  return array(
38
- 'browser',
39
- 'platform',
40
- 'version',
41
- 'ip',
42
- 'track_all',
43
- 'timestamp',
44
- 'page_uri',
45
- 'user_id',
 
46
  );
47
  }
48
 
@@ -53,22 +54,12 @@ class Hit extends \WP_STATISTICS\RestAPI
53
  */
54
  public function register_routes()
55
  {
56
-
57
- // Create Require Params
58
- $params = array();
59
- foreach (self::require_params_hit() as $p) {
60
- $params[$p] = array('required' => true);
61
- }
62
-
63
- // Add X-WP-Nonce
64
- $params['_wpnonce'] = array('required' => true);
65
-
66
  // Record WP-Statistics when Cache is enable
67
  register_rest_route(self::$namespace, '/' . self::$endpoint, array(
68
  array(
69
  'methods' => \WP_REST_Server::READABLE,
70
  'callback' => array($this, 'hit_callback'),
71
- 'args' => $params,
72
  'permission_callback' => function (\WP_REST_Request $request) {
73
  return true;
74
  }
35
  public static function require_params_hit()
36
  {
37
  return array(
38
+ 'browser' => array('required' => true, 'type' => 'string'),
39
+ 'platform' => array('required' => true, 'type' => 'string'),
40
+ 'version' => array('required' => true, 'type' => 'string'),
41
+ 'ip' => array('required' => true, 'type' => 'string', 'format' => 'ip'),
42
+ 'track_all' => array('required' => true, 'type' => 'integer'),
43
+ 'timestamp' => array('required' => true, 'type' => 'integer'),
44
+ 'page_uri' => array('required' => true, 'type' => 'string'),
45
+ 'user_id' => array('required' => true, 'type' => 'integer'),
46
+ '_wpnonce' => array('required' => true, 'type' => 'string')
47
  );
48
  }
49
 
54
  */
55
  public function register_routes()
56
  {
 
 
 
 
 
 
 
 
 
 
57
  // Record WP-Statistics when Cache is enable
58
  register_rest_route(self::$namespace, '/' . self::$endpoint, array(
59
  array(
60
  'methods' => \WP_REST_Server::READABLE,
61
  'callback' => array($this, 'hit_callback'),
62
+ 'args' => self::require_params_hit(),
63
  'permission_callback' => function (\WP_REST_Request $request) {
64
  return true;
65
  }
includes/class-wp-statistics-hits.php CHANGED
@@ -66,9 +66,9 @@ class Hits
66
 
67
  if (isset($this->rest_hits->browser) and isset($this->rest_hits->platform) and isset($this->rest_hits->version)) {
68
  return array(
69
- 'browser' => $this->rest_hits->browser,
70
- 'platform' => $this->rest_hits->platform,
71
- 'version' => $this->rest_hits->version,
72
  );
73
  }
74
 
@@ -94,7 +94,7 @@ class Hits
94
  */
95
  public function set_user_ip($ip)
96
  {
97
- return isset($this->rest_hits->ip) ? $this->rest_hits->ip : $ip;
98
  }
99
 
100
  /**
@@ -180,8 +180,8 @@ class Hits
180
 
181
  if (isset($this->rest_hits->current_page_type) and isset($this->rest_hits->current_page_id)) {
182
  return array(
183
- 'type' => $this->rest_hits->current_page_type,
184
- 'id' => $this->rest_hits->current_page_id,
185
  'search_query' => isset($this->rest_hits->search_query) ? $this->rest_hits->search_query : ''
186
  );
187
  }
66
 
67
  if (isset($this->rest_hits->browser) and isset($this->rest_hits->platform) and isset($this->rest_hits->version)) {
68
  return array(
69
+ 'browser' => esc_sql(sanitize_text_field($this->rest_hits->browser)),
70
+ 'platform' => esc_sql(sanitize_text_field($this->rest_hits->platform)),
71
+ 'version' => esc_sql(sanitize_text_field($this->rest_hits->version)),
72
  );
73
  }
74
 
94
  */
95
  public function set_user_ip($ip)
96
  {
97
+ return isset($this->rest_hits->ip) ? esc_sql($this->rest_hits->ip) : esc_sql($ip);
98
  }
99
 
100
  /**
180
 
181
  if (isset($this->rest_hits->current_page_type) and isset($this->rest_hits->current_page_id)) {
182
  return array(
183
+ 'type' => esc_sql($this->rest_hits->current_page_type),
184
+ 'id' => esc_sql($this->rest_hits->current_page_id),
185
  'search_query' => isset($this->rest_hits->search_query) ? $this->rest_hits->search_query : ''
186
  );
187
  }
includes/class-wp-statistics-ip.php CHANGED
@@ -79,7 +79,7 @@ class IP
79
  $ip = self::$default_ip;
80
  }
81
 
82
- return apply_filters('wp_statistics_user_ip', $ip);
83
  }
84
 
85
  /**
@@ -129,7 +129,7 @@ class IP
129
  $user_ip = substr($user_ip, 0, strrpos($user_ip, '.')) . '.0';
130
  }
131
 
132
- return $user_ip;
133
  }
134
 
135
  /**
79
  $ip = self::$default_ip;
80
  }
81
 
82
+ return apply_filters('wp_statistics_user_ip', sanitize_text_field($ip));
83
  }
84
 
85
  /**
129
  $user_ip = substr($user_ip, 0, strrpos($user_ip, '.')) . '.0';
130
  }
131
 
132
+ return sanitize_text_field($user_ip);
133
  }
134
 
135
  /**
includes/class-wp-statistics-pages.php CHANGED
@@ -51,7 +51,7 @@ class Pages
51
  $current_page['type'] = "archive";
52
  }
53
 
54
- //Single Post Fro All Post Type
55
  if (is_singular()) {
56
  $current_page['type'] = "post";
57
  }
@@ -222,7 +222,7 @@ class Pages
222
  $page_uri = self::sanitize_page_uri();
223
 
224
  // Check if we have already been to this page today.
225
- $exist = $wpdb->get_row("SELECT `page_id` FROM `" . DB::table('pages') . "` WHERE `date` = '" . TimeZone::getCurrentDate('Y-m-d') . "' " . (array_key_exists("search_query", $current_page) === true ? "AND `uri` = '" . esc_sql($page_uri) . "'" : "") . "AND `type` = '{$current_page['type']}' AND `id` = {$current_page['id']}", ARRAY_A);
226
 
227
  // Update Exist Page
228
  if (null !== $exist) {
51
  $current_page['type'] = "archive";
52
  }
53
 
54
+ //Single Post From All Post Type
55
  if (is_singular()) {
56
  $current_page['type'] = "post";
57
  }
222
  $page_uri = self::sanitize_page_uri();
223
 
224
  // Check if we have already been to this page today.
225
+ $exist = $wpdb->get_row("SELECT `page_id` FROM `" . DB::table('pages') . "` WHERE `date` = '" . TimeZone::getCurrentDate('Y-m-d') . "' " . (array_key_exists("search_query", $current_page) === true ? "AND `uri` = '" . esc_sql($page_uri) . "'" : "") . "AND `type` = '{$current_page['type']}' AND `id` = '{$current_page['id']}'", ARRAY_A);
226
 
227
  // Update Exist Page
228
  if (null !== $exist) {
includes/class-wp-statistics-user-online.php CHANGED
@@ -263,10 +263,14 @@ class UserOnline
263
  $list = array();
264
  foreach ($result as $items) {
265
 
 
 
 
 
266
  $item = array(
267
  'referred' => Referred::get_referrer_link($items->referred),
268
- 'agent' => $items->agent,
269
- 'platform' => $items->platform,
270
  'version' => $items->version,
271
  );
272
 
@@ -286,17 +290,17 @@ class UserOnline
286
 
287
  // Push Browser
288
  $item['browser'] = array(
289
- 'name' => $items->agent,
290
- 'logo' => UserAgent::getBrowserLogo($items->agent),
291
- 'link' => Menus::admin_url('overview', array('agent' => $items->agent))
292
  );
293
 
294
  // Push IP
295
- if (IP::IsHashIP($items->ip)) {
296
  $item['hash_ip'] = IP::$hash_ip_prefix;
297
  } else {
298
- $item['ip'] = array('value' => $items->ip, 'link' => Menus::admin_url('visitors', array('ip' => $items->ip)));
299
- $item['map'] = GeoIP::geoIPTools($items->ip);
300
  }
301
 
302
  // Push Country
@@ -306,7 +310,7 @@ class UserOnline
306
 
307
  // Push City
308
  if (GeoIP::active('city')) {
309
- $item['city'] = GeoIP::getCity($items->ip);
310
  }
311
 
312
  // Online For Time
263
  $list = array();
264
  foreach ($result as $items) {
265
 
266
+ $ip = esc_html($items->ip);
267
+ $agent = esc_html($items->agent);
268
+ $platform = esc_html($items->platform);
269
+
270
  $item = array(
271
  'referred' => Referred::get_referrer_link($items->referred),
272
+ 'agent' => $agent,
273
+ 'platform' => $platform,
274
  'version' => $items->version,
275
  );
276
 
290
 
291
  // Push Browser
292
  $item['browser'] = array(
293
+ 'name' => $agent,
294
+ 'logo' => UserAgent::getBrowserLogo($agent),
295
+ 'link' => Menus::admin_url('overview', array('agent' => $agent))
296
  );
297
 
298
  // Push IP
299
+ if (IP::IsHashIP($ip)) {
300
  $item['hash_ip'] = IP::$hash_ip_prefix;
301
  } else {
302
+ $item['ip'] = array('value' => $ip, 'link' => Menus::admin_url('visitors', array('ip' => $ip)));
303
+ $item['map'] = GeoIP::geoIPTools($ip);
304
  }
305
 
306
  // Push Country
310
 
311
  // Push City
312
  if (GeoIP::active('city')) {
313
+ $item['city'] = GeoIP::getCity($ip);
314
  }
315
 
316
  // Online For Time
includes/class-wp-statistics-visitor.php CHANGED
@@ -272,14 +272,18 @@ class Visitor
272
  // Push to List
273
  foreach ($result as $items) {
274
 
 
 
 
 
275
  $item = array(
276
  'hits' => (int)$items->hits,
277
  'referred' => Referred::get_referrer_link($items->referred),
278
  'refer' => $items->referred,
279
  'date' => date_i18n(get_option('date_format'), strtotime($items->last_counter)),
280
- 'agent' => $items->agent,
281
- 'platform' => $items->platform,
282
- 'version' => $items->version
283
  );
284
 
285
  // Push User Data
@@ -293,17 +297,17 @@ class Visitor
293
 
294
  // Push Browser
295
  $item['browser'] = array(
296
- 'name' => $items->agent,
297
- 'logo' => UserAgent::getBrowserLogo($items->agent),
298
- 'link' => Menus::admin_url('overview', array('agent' => $items->agent))
299
  );
300
 
301
  // Push IP
302
- if (IP::IsHashIP($items->ip)) {
303
  $item['hash_ip'] = IP::$hash_ip_prefix;
304
  } else {
305
- $item['ip'] = array('value' => $items->ip, 'link' => Menus::admin_url('visitors', array('ip' => $items->ip)));
306
- $item['map'] = GeoIP::geoIPTools($items->ip);
307
  }
308
 
309
  // Push Country
@@ -313,7 +317,7 @@ class Visitor
313
 
314
  // Push City
315
  if (GeoIP::active('city')) {
316
- $item['city'] = GeoIP::getCity($items->ip);
317
  }
318
 
319
  // Check If Search Word
272
  // Push to List
273
  foreach ($result as $items) {
274
 
275
+ $ip = esc_html($items->ip);
276
+ $agent = esc_html($items->agent);
277
+ $platform = esc_html($items->platform);
278
+
279
  $item = array(
280
  'hits' => (int)$items->hits,
281
  'referred' => Referred::get_referrer_link($items->referred),
282
  'refer' => $items->referred,
283
  'date' => date_i18n(get_option('date_format'), strtotime($items->last_counter)),
284
+ 'agent' => $agent,
285
+ 'platform' => $platform,
286
+ 'version' => esc_html($items->version)
287
  );
288
 
289
  // Push User Data
297
 
298
  // Push Browser
299
  $item['browser'] = array(
300
+ 'name' => $agent,
301
+ 'logo' => UserAgent::getBrowserLogo($agent),
302
+ 'link' => Menus::admin_url('overview', array('agent' => $agent))
303
  );
304
 
305
  // Push IP
306
+ if (IP::IsHashIP($ip)) {
307
  $item['hash_ip'] = IP::$hash_ip_prefix;
308
  } else {
309
+ $item['ip'] = array('value' => $ip, 'link' => Menus::admin_url('visitors', array('ip' => $ip)));
310
+ $item['map'] = GeoIP::geoIPTools($ip);
311
  }
312
 
313
  // Push Country
317
 
318
  // Push City
319
  if (GeoIP::active('city')) {
320
+ $item['city'] = GeoIP::getCity($ip);
321
  }
322
 
323
  // Check If Search Word
includes/template-functions.php CHANGED
@@ -605,7 +605,7 @@ function wp_statistics_ua_list($rangestartdate = null, $rangeenddate = null)
605
 
606
  //Check Browser is defined in wp-statistics
607
  if (array_key_exists(strtolower($out[0]), $default_browser)) {
608
- $Browsers[] = $out[0];
609
  }
610
  }
611
 
@@ -656,7 +656,7 @@ function wp_statistics_platform_list($rangestartdate = null, $rangeenddate = nul
656
 
657
  $Platforms = array();
658
  foreach ($result as $out) {
659
- $Platforms[] = $out[0];
660
  }
661
 
662
  return $Platforms;
605
 
606
  //Check Browser is defined in wp-statistics
607
  if (array_key_exists(strtolower($out[0]), $default_browser)) {
608
+ $Browsers[] = esc_html($out[0]);
609
  }
610
  }
611
 
656
 
657
  $Platforms = array();
658
  foreach ($result as $out) {
659
+ $Platforms[] = esc_html($out[0]);
660
  }
661
 
662
  return $Platforms;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp-statistics.com/donate/
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
  Tested up to: 5.9
7
- Stable tag: 13.1.5
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -124,11 +124,14 @@ Before updating, make sure you disabled all your add-ons, then after that, try t
124
  If you encounter any bug, please create an issue on [Github](https://github.com/wp-statistics/wp-statistics/issues/new) where we can act upon them more efficiently. Since [Github](https://github.com/wp-statistics/wp-statistics) is not a support forum, just bugs are welcomed, and any other request will be closed.
125
 
126
  == Changelog ==
 
 
 
127
  = v13.1.5 - 02.02.2022 =
128
  * Enhancement: Tested up to v5.9
129
  * Enhancement: Disable showing the notices with hidden class in the admin settings page
130
  * Bugfix: A security issue to accepting the correct `exclusion_reason` through request
131
- * Bugfix: The 403 Forbidden Error issue
132
 
133
  = v13.1.4 - 14.01.2022 =
134
  * Enhancement: Datepicker direction issue has been fixed
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
  Tested up to: 5.9
7
+ Stable tag: 13.1.6
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
124
  If you encounter any bug, please create an issue on [Github](https://github.com/wp-statistics/wp-statistics/issues/new) where we can act upon them more efficiently. Since [Github](https://github.com/wp-statistics/wp-statistics) is not a support forum, just bugs are welcomed, and any other request will be closed.
125
 
126
  == Changelog ==
127
+ = v13.1.6 - 16.02.2022 =
128
+ * Bugfix: Hardened plugin security. (Special thanks to Muhammad Zeeshan (Xib3rR4dAr) & WPScan for reporting the issues)
129
+
130
  = v13.1.5 - 02.02.2022 =
131
  * Enhancement: Tested up to v5.9
132
  * Enhancement: Disable showing the notices with hidden class in the admin settings page
133
  * Bugfix: A security issue to accepting the correct `exclusion_reason` through request
134
+ * Bugfix: The 403 Forbidden Error issue in REST request
135
 
136
  = v13.1.4 - 14.01.2022 =
137
  * Enhancement: Datepicker direction issue has been fixed
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: This plugin gives you the complete information on your website's visitors.
6
- * Version: 13.1.5
7
  * Author: VeronaLabs
8
  * Author URI: https://veronalabs.com/
9
  * Text Domain: wp-statistics
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: This plugin gives you the complete information on your website's visitors.
6
+ * Version: 13.1.6
7
  * Author: VeronaLabs
8
  * Author URI: https://veronalabs.com/
9
  * Text Domain: wp-statistics