WP Statistics - Version 9.6.3

Version Description

Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.

Download this release

Release Info

Developer GregRoss
Plugin Icon 128x128 WP Statistics
Version 9.6.3
Comparing to
See all releases

Code changes from version 9.6.2 to 9.6.3

includes/classes/hits.class.php CHANGED
@@ -40,7 +40,7 @@
40
  }
41
 
42
  // Check to see if the user wants us to record why we're excluding hits.
43
- if( $this->get_option('record_exclusions' ) == 1 ) {
44
  $this->exclusion_record = TRUE;
45
  }
46
 
@@ -159,7 +159,7 @@
159
  if( $ua_string == "WordPress/" . $wp_version . "; " . get_home_url(null,"/") ) { $this->exclusion_match = TRUE; $this->exclusion_reason = "self referral"; }
160
  if( $ua_string == "WordPress/" . $wp_version . "; " . get_home_url() ) { $this->exclusion_match = TRUE; $this->exclusion_reason = "self referral"; }
161
 
162
- if( $this->get_option('exclude_loginpage') == 1 ) {
163
  $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
164
  $host = $_SERVER['HTTP_HOST'];
165
  $script = $_SERVER['SCRIPT_NAME'];
@@ -173,7 +173,7 @@
173
  }
174
  }
175
 
176
- if( $this->get_option('exclude_adminpage') == 1 && !$this->exclusion_match ) {
177
  $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
178
  $host = $_SERVER['HTTP_HOST'];
179
  $script = $_SERVER['SCRIPT_NAME'];
@@ -189,9 +189,9 @@
189
  }
190
  }
191
 
192
- if( $this->get_option('referrerspam') == 1 && !$this->exclusion_match ) {
193
  $referrer = $this->get_Referred();
194
-
195
  // Pull the referrer spam list from the database.
196
  $referrerspamlist = explode( "\n", $this->get_option('referrerspamlist') );
197
 
@@ -210,7 +210,7 @@
210
  }
211
  }
212
 
213
- if( $this->get_option('exclude_feeds') == 1 && !$this->exclusion_match ) {
214
  if( is_object( $WP_Statistics ) ) {
215
  if( $WP_Statistics->check_feed() ) {
216
  $this->exclusion_match = TRUE;
@@ -219,7 +219,7 @@
219
  }
220
  }
221
 
222
- if( $this->get_option('exclude_404s') == 1 && !$this->exclusion_match ) {
223
  if( is_404() ) {
224
  $this->exclusion_match = TRUE;
225
  $this->exclusion_reason = "404";
@@ -427,7 +427,7 @@
427
  $this->exclusion_match = TRUE;
428
  $this->exclusion_reason = "robot_threshold";
429
  }
430
- else if( $this->result->honeypot == 1 ) {
431
  $this->exclusion_match = TRUE;
432
  $this->exclusion_reason = "honeypot";
433
  }
40
  }
41
 
42
  // Check to see if the user wants us to record why we're excluding hits.
43
+ if( $this->get_option('record_exclusions' ) ) {
44
  $this->exclusion_record = TRUE;
45
  }
46
 
159
  if( $ua_string == "WordPress/" . $wp_version . "; " . get_home_url(null,"/") ) { $this->exclusion_match = TRUE; $this->exclusion_reason = "self referral"; }
160
  if( $ua_string == "WordPress/" . $wp_version . "; " . get_home_url() ) { $this->exclusion_match = TRUE; $this->exclusion_reason = "self referral"; }
161
 
162
+ if( $this->get_option('exclude_loginpage') ) {
163
  $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
164
  $host = $_SERVER['HTTP_HOST'];
165
  $script = $_SERVER['SCRIPT_NAME'];
173
  }
174
  }
175
 
176
+ if( $this->get_option('exclude_adminpage') && !$this->exclusion_match ) {
177
  $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
178
  $host = $_SERVER['HTTP_HOST'];
179
  $script = $_SERVER['SCRIPT_NAME'];
189
  }
190
  }
191
 
192
+ if( $this->get_option('referrerspam') && !$this->exclusion_match ) {
193
  $referrer = $this->get_Referred();
194
+
195
  // Pull the referrer spam list from the database.
196
  $referrerspamlist = explode( "\n", $this->get_option('referrerspamlist') );
197
 
210
  }
211
  }
212
 
213
+ if( $this->get_option('exclude_feeds') && !$this->exclusion_match ) {
214
  if( is_object( $WP_Statistics ) ) {
215
  if( $WP_Statistics->check_feed() ) {
216
  $this->exclusion_match = TRUE;
219
  }
220
  }
221
 
222
+ if( $this->get_option('exclude_404s') && !$this->exclusion_match ) {
223
  if( is_404() ) {
224
  $this->exclusion_match = TRUE;
225
  $this->exclusion_reason = "404";
427
  $this->exclusion_match = TRUE;
428
  $this->exclusion_reason = "robot_threshold";
429
  }
430
+ else if( $this->result->honeypot ) {
431
  $this->exclusion_match = TRUE;
432
  $this->exclusion_reason = "honeypot";
433
  }
includes/settings/tabs/wps-externals.php CHANGED
@@ -198,12 +198,13 @@ if( $wps_nonce_valid ) {
198
  if( $WP_Statistics->get_option('schedule_browscap') ) {
199
  echo '<p class="description">' . __('Next update will be') .': <code>';
200
  $last_update = $WP_Statistics->get_option('last_browscap_dl');
 
201
  $next_update = $last_update + (86400 * 7);
202
 
203
  $next_schedule = wp_next_scheduled('wp_statistics_browscap_hook');
204
 
205
  if( $next_schedule ) {
206
- echo date( get_option('date_format'), $next_update ) . ' @ ' . date( get_option('time_format'), $next_schedule );
207
  } else {
208
  echo date( get_option('date_format'), $next_update ) . ' @ ' . date( get_option('time_format'), time() );
209
  }
@@ -261,12 +262,13 @@ if( $wps_nonce_valid ) {
261
  if( $WP_Statistics->get_option('schedule_referrerspam') ) {
262
  echo '<p class="description">' . __('Next update will be') .': <code>';
263
  $last_update = $WP_Statistics->get_option('schedule_referrerspam');
 
264
  $next_update = $last_update + (86400 * 7);
265
 
266
  $next_schedule = wp_next_scheduled('wp_statistics_referrerspam_hook');
267
 
268
  if( $next_schedule ) {
269
- echo date( get_option('date_format'), $next_update ) . ' @ ' . date( get_option('time_format'), $next_schedule );
270
  } else {
271
  echo date( get_option('date_format'), $next_update ) . ' @ ' . date( get_option('time_format'), time() );
272
  }
198
  if( $WP_Statistics->get_option('schedule_browscap') ) {
199
  echo '<p class="description">' . __('Next update will be') .': <code>';
200
  $last_update = $WP_Statistics->get_option('last_browscap_dl');
201
+ if( $last_update == 0 ) { $last_update = time(); }
202
  $next_update = $last_update + (86400 * 7);
203
 
204
  $next_schedule = wp_next_scheduled('wp_statistics_browscap_hook');
205
 
206
  if( $next_schedule ) {
207
+ echo date( get_option('date_format'), $next_schedule ) . ' @ ' . date( get_option('time_format'), $next_schedule );
208
  } else {
209
  echo date( get_option('date_format'), $next_update ) . ' @ ' . date( get_option('time_format'), time() );
210
  }
262
  if( $WP_Statistics->get_option('schedule_referrerspam') ) {
263
  echo '<p class="description">' . __('Next update will be') .': <code>';
264
  $last_update = $WP_Statistics->get_option('schedule_referrerspam');
265
+ if( $last_update == 0 ) { $last_update = time(); }
266
  $next_update = $last_update + (86400 * 7);
267
 
268
  $next_schedule = wp_next_scheduled('wp_statistics_referrerspam_hook');
269
 
270
  if( $next_schedule ) {
271
+ echo date( get_option('date_format'), $next_schedule ) . ' @ ' . date( get_option('time_format'), $next_schedule );
272
  } else {
273
  echo date( get_option('date_format'), $next_update ) . ' @ ' . date( get_option('time_format'), time() );
274
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wp-statistics.com/donate/
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, feedburner, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.3
7
- Stable tag: 9.6.2
8
  License: GPL3
9
 
10
  Complete statistics for your WordPress site.
@@ -235,6 +235,9 @@ If you still have issues open a new thread on the support forum and we'll try an
235
  10. View latest search engine referrers Statistics page.
236
 
237
  == Upgrade Notice ==
 
 
 
238
  = 9.6.2 =
239
  This is a security release, please upgrade immediately.
240
  Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.
@@ -289,6 +292,14 @@ BACKUP YOUR DATABASE BEFORE INSTALLING! This release alters the table structure
289
  This release updates some core code to do with timezones, hence the change to version 9.0, if you see any issues with timezones, please let us know. In addition, you may see an increase in your visits count as a race condition that dropped some visits has been resolved.
290
 
291
  == Changelog ==
 
 
 
 
 
 
 
 
292
  = 9.6.2 =
293
  * Release Date: September 5, 2015
294
  * Added: Search table to the empty table list.
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, feedburner, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.3
7
+ Stable tag: 9.6.3
8
  License: GPL3
9
 
10
  Complete statistics for your WordPress site.
235
  10. View latest search engine referrers Statistics page.
236
 
237
  == Upgrade Notice ==
238
+ = 9.6.3 =
239
+ Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.
240
+
241
  = 9.6.2 =
242
  This is a security release, please upgrade immediately.
243
  Have you updated your database indexes and search table? If not please go to Statistics->Optimization->Database after you have installed the update and run the updates.
292
  This release updates some core code to do with timezones, hence the change to version 9.0, if you see any issues with timezones, please let us know. In addition, you may see an increase in your visits count as a race condition that dropped some visits has been resolved.
293
 
294
  == Changelog ==
295
+ = 9.6.3 =
296
+ * Release Date: September 11, 2015
297
+ * Updated: The database update nag link to the optimization page instead of the settings page.
298
+ * Updated: Handle the case where the downloads haven't happened yet.
299
+ * Fixed: In some cases the extenrals tab would show the wrong date for the next scheduled update.
300
+ * Fixed: In some cases the Piwik and other features may not be enabled even when the checkboxes were selected.
301
+ * Fixed: If no page id was passed in on the pagestats shortcode the wrong default for page id would be used and no stats would be displayed.
302
+
303
  = 9.6.2 =
304
  * Release Date: September 5, 2015
305
  * Added: Search table to the empty table list.
shortcode.php CHANGED
@@ -22,7 +22,7 @@
22
  if( !array_key_exists( 'time', $atts ) ) { $atts['time'] = null; }
23
  if( !array_key_exists( 'provider', $atts ) ) { $atts['provider'] = null; }
24
  if( !array_key_exists( 'format', $atts ) ) { $atts['format'] = null; }
25
- if( !array_key_exists( 'id', $atts ) ) { $atts['id'] = null; }
26
 
27
  $formatnumber = array_key_exists( 'format', $atts );
28
 
22
  if( !array_key_exists( 'time', $atts ) ) { $atts['time'] = null; }
23
  if( !array_key_exists( 'provider', $atts ) ) { $atts['provider'] = null; }
24
  if( !array_key_exists( 'format', $atts ) ) { $atts['format'] = null; }
25
+ if( !array_key_exists( 'id', $atts ) ) { $atts['id'] = -1; }
26
 
27
  $formatnumber = array_key_exists( 'format', $atts );
28
 
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Statistics
4
  Plugin URI: http://wp-statistics.com/
5
  Description: Complete statistics for your WordPress site.
6
- Version: 9.6.2
7
  Author: Mostafa Soufi & Greg Ross
8
  Author URI: http://wp-statistics.com/
9
  Text Domain: wp_statistics
@@ -12,7 +12,7 @@ License: GPL2
12
  */
13
 
14
  // These defines are used later for various reasons.
15
- define('WP_STATISTICS_VERSION', '9.6.2');
16
  define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
17
  define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.3.0');
18
  define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);
@@ -147,7 +147,7 @@ License: GPL2
147
  if( count( $itemstoenable ) > 0 )
148
  echo '<div class="update-nag">'.sprintf(__('The following features are disabled, please go to %s and enable them: %s', 'wp_statistics'), '<a href="' . $get_bloginfo_url . '">' . __( 'settings page', 'wp_statistics') . '</a>', implode(__(',', 'wp_statistics'), $itemstoenable)).'</div>';
149
 
150
- $get_bloginfo_url = get_admin_url() . "admin.php?page=wp-statistics/optimization";
151
 
152
  $dbupdatestodo = array();
153
 
@@ -167,7 +167,7 @@ License: GPL2
167
  }
168
 
169
  if( count( $dbupdatestodo ) > 0 )
170
- echo '<div class="update-nag">'.sprintf(__('Database updates are required, please go to %s and update the following: %s', 'wp_statistics'), '<a href="' . $get_bloginfo_url . '">' . __( 'settings page', 'wp_statistics') . '</a>', implode(__(',', 'wp_statistics'), $dbupdatestodo)).'</div>';
171
 
172
  }
173
  }
3
  Plugin Name: WP Statistics
4
  Plugin URI: http://wp-statistics.com/
5
  Description: Complete statistics for your WordPress site.
6
+ Version: 9.6.3
7
  Author: Mostafa Soufi & Greg Ross
8
  Author URI: http://wp-statistics.com/
9
  Text Domain: wp_statistics
12
  */
13
 
14
  // These defines are used later for various reasons.
15
+ define('WP_STATISTICS_VERSION', '9.6.3');
16
  define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
17
  define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.3.0');
18
  define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);
147
  if( count( $itemstoenable ) > 0 )
148
  echo '<div class="update-nag">'.sprintf(__('The following features are disabled, please go to %s and enable them: %s', 'wp_statistics'), '<a href="' . $get_bloginfo_url . '">' . __( 'settings page', 'wp_statistics') . '</a>', implode(__(',', 'wp_statistics'), $itemstoenable)).'</div>';
149
 
150
+ $get_bloginfo_url = get_admin_url() . "admin.php?page=wp-statistics/optimization&tab=database";
151
 
152
  $dbupdatestodo = array();
153
 
167
  }
168
 
169
  if( count( $dbupdatestodo ) > 0 )
170
+ echo '<div class="update-nag">'.sprintf(__('Database updates are required, please go to %s and update the following: %s', 'wp_statistics'), '<a href="' . $get_bloginfo_url . '">' . __( 'optimization page', 'wp_statistics') . '</a>', implode(__(',', 'wp_statistics'), $dbupdatestodo)).'</div>';
171
 
172
  }
173
  }