Version Description
- Fixes: a Small bug in to get rid of one of the reported warnings from debug mode.
Download this release
Release Info
Developer | mostafa.s1990 |
Plugin | WP Statistics |
Version | 4.6.1 |
Comparing to | |
See all releases |
Code changes from version 4.6 to 4.6.1
- includes/class/statistics.class.php +14 -14
- readme.txt +23 -20
- wp-statistics.php +3 -2
includes/class/statistics.class.php
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
if( get_option('wps_coefficient') ) {
|
21 |
$this->coefficient = get_option('wps_coefficient');
|
22 |
}
|
23 |
-
|
24 |
}
|
25 |
|
26 |
public function Primary_Values() {
|
@@ -98,7 +98,7 @@
|
|
98 |
public function get_UserAgent() {
|
99 |
|
100 |
$agent = parse_user_agent();
|
101 |
-
|
102 |
if( $agent['browser'] == null ) { $agent['browser'] = "Unknown"; }
|
103 |
if( $agent['platform'] == null ) { $agent['platform'] = "Unknown"; }
|
104 |
if( $agent['version'] == null ) { $agent['version'] = "Unknown"; }
|
@@ -109,7 +109,7 @@
|
|
109 |
public function get_Referred($default_referr = false) {
|
110 |
|
111 |
if( $default_referr ) {
|
112 |
-
if( esc_sql(strip_tags($_SERVER['HTTP_REFERER'])) ) {
|
113 |
return get_bloginfo('url');
|
114 |
} else {
|
115 |
return esc_sql(strip_tags($_SERVER['HTTP_REFERER']));
|
@@ -136,7 +136,7 @@
|
|
136 |
}
|
137 |
|
138 |
public function Search_Engine_Info($url = false) {
|
139 |
-
|
140 |
if(!$url) {
|
141 |
$url = isset($_SERVER['HTTP_REFERER']) ? $this->get_Referred() : false;
|
142 |
}
|
@@ -144,14 +144,14 @@
|
|
144 |
if($url == false) {
|
145 |
return false;
|
146 |
}
|
147 |
-
|
148 |
$parts = parse_url($url);
|
149 |
-
|
150 |
$search_engines = wp_statistics_searchengine_list();
|
151 |
-
|
152 |
foreach( $search_engines as $key => $value ) {
|
153 |
$search_regex = wp_statistics_searchengine_regex($key);
|
154 |
-
|
155 |
preg_match( '/' . $search_regex . '/', $parts['host'], $matches);
|
156 |
|
157 |
if( isset($matches[1]) )
|
@@ -159,7 +159,7 @@
|
|
159 |
return $value;
|
160 |
}
|
161 |
}
|
162 |
-
|
163 |
return array('name' => 'Unknown', 'tag' => '', 'sqlpattern' => '', 'regexpattern' => '', 'querykey' => 'q', 'image' => 'unknown.png' );
|
164 |
}
|
165 |
|
@@ -172,16 +172,16 @@
|
|
172 |
if($url == false) {
|
173 |
return false;
|
174 |
}
|
175 |
-
|
176 |
$parts = parse_url($url);
|
177 |
|
178 |
if( array_key_exists('query',$parts) ) { parse_str($parts['query'], $query); } else { $query = array(); }
|
179 |
-
|
180 |
$search_engines = wp_statistics_searchengine_list();
|
181 |
-
|
182 |
foreach( $search_engines as $key => $value ) {
|
183 |
$search_regex = wp_statistics_searchengine_regex($key);
|
184 |
-
|
185 |
preg_match( '/' . $search_regex . '/', $parts['host'], $matches);
|
186 |
|
187 |
if( isset($matches[1]) )
|
@@ -197,7 +197,7 @@
|
|
197 |
return $words;
|
198 |
}
|
199 |
}
|
200 |
-
|
201 |
return '';
|
202 |
}
|
203 |
}
|
20 |
if( get_option('wps_coefficient') ) {
|
21 |
$this->coefficient = get_option('wps_coefficient');
|
22 |
}
|
23 |
+
|
24 |
}
|
25 |
|
26 |
public function Primary_Values() {
|
98 |
public function get_UserAgent() {
|
99 |
|
100 |
$agent = parse_user_agent();
|
101 |
+
|
102 |
if( $agent['browser'] == null ) { $agent['browser'] = "Unknown"; }
|
103 |
if( $agent['platform'] == null ) { $agent['platform'] = "Unknown"; }
|
104 |
if( $agent['version'] == null ) { $agent['version'] = "Unknown"; }
|
109 |
public function get_Referred($default_referr = false) {
|
110 |
|
111 |
if( $default_referr ) {
|
112 |
+
if( !esc_sql(strip_tags($_SERVER['HTTP_REFERER'])) ) {
|
113 |
return get_bloginfo('url');
|
114 |
} else {
|
115 |
return esc_sql(strip_tags($_SERVER['HTTP_REFERER']));
|
136 |
}
|
137 |
|
138 |
public function Search_Engine_Info($url = false) {
|
139 |
+
|
140 |
if(!$url) {
|
141 |
$url = isset($_SERVER['HTTP_REFERER']) ? $this->get_Referred() : false;
|
142 |
}
|
144 |
if($url == false) {
|
145 |
return false;
|
146 |
}
|
147 |
+
|
148 |
$parts = parse_url($url);
|
149 |
+
|
150 |
$search_engines = wp_statistics_searchengine_list();
|
151 |
+
|
152 |
foreach( $search_engines as $key => $value ) {
|
153 |
$search_regex = wp_statistics_searchengine_regex($key);
|
154 |
+
|
155 |
preg_match( '/' . $search_regex . '/', $parts['host'], $matches);
|
156 |
|
157 |
if( isset($matches[1]) )
|
159 |
return $value;
|
160 |
}
|
161 |
}
|
162 |
+
|
163 |
return array('name' => 'Unknown', 'tag' => '', 'sqlpattern' => '', 'regexpattern' => '', 'querykey' => 'q', 'image' => 'unknown.png' );
|
164 |
}
|
165 |
|
172 |
if($url == false) {
|
173 |
return false;
|
174 |
}
|
175 |
+
|
176 |
$parts = parse_url($url);
|
177 |
|
178 |
if( array_key_exists('query',$parts) ) { parse_str($parts['query'], $query); } else { $query = array(); }
|
179 |
+
|
180 |
$search_engines = wp_statistics_searchengine_list();
|
181 |
+
|
182 |
foreach( $search_engines as $key => $value ) {
|
183 |
$search_regex = wp_statistics_searchengine_regex($key);
|
184 |
+
|
185 |
preg_match( '/' . $search_regex . '/', $parts['host'], $matches);
|
186 |
|
187 |
if( isset($matches[1]) )
|
197 |
return $words;
|
198 |
}
|
199 |
}
|
200 |
+
|
201 |
return '';
|
202 |
}
|
203 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://iran98.org/donate/
|
|
4 |
Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, yearl, total, post, page, sidebar, summary, feedburner, hits, pagerank, google, alexa, live visit
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.8
|
7 |
-
Stable tag: 4.6
|
8 |
License: GPL2
|
9 |
|
10 |
Complete statistics for your blog.
|
@@ -136,7 +136,7 @@ Make sure you've downloaded the GeoIP database and the GeoIP code is enabled.
|
|
136 |
Also, if your running an internal test site with non-routable IP addresses (like 192.168.x.x or 172.28.x.x or 10.x.x.x), these addresses will come up as unknown always.
|
137 |
|
138 |
= I was using V3.2 and now that I've upgraded my visitors and visits have gone way down? =
|
139 |
-
The webcrawler detection code has be
|
140 |
|
141 |
== Screenshots ==
|
142 |
1. View stats page.
|
@@ -162,16 +162,19 @@ The webcrawler detection code has be fixed and will now exclude them from your s
|
|
162 |
* As the webcrawler code is now working, you'll probably see a significant change in the "Unknown" browser category and the number of hits your site gets.
|
163 |
|
164 |
== Changelog ==
|
|
|
|
|
|
|
165 |
= 4.6 =
|
166 |
* Added: In the optimization page you can now empty all tables at once.
|
167 |
* Added: In the optimization page you can now purge statistics over a given number of days old.
|
168 |
* Added: Daily scheduled job to purge statistics over a given number of days old.
|
169 |
-
*
|
170 |
-
*
|
171 |
-
*
|
172 |
-
*
|
173 |
-
*
|
174 |
-
*
|
175 |
|
176 |
= 4.5 =
|
177 |
* Added: Support for more search engines: DuckDuckGo, Baidu and Yandex.
|
@@ -181,18 +184,18 @@ The webcrawler detection code has be fixed and will now exclude them from your s
|
|
181 |
* Updated: Added new bot match strings: 'archive.org_bot', 'meanpathbot', 'moreover', 'spbot'.
|
182 |
* Updated: Replaced bot match string 'ezooms.bot' with 'ezooms'.
|
183 |
* Updated: Overview summary statistics layout.
|
184 |
-
*
|
185 |
|
186 |
= 4.4 =
|
187 |
* Added: option to set the required capability level to view statistics in the admin interface.
|
188 |
* Added: option to set the required capability level to manage statistics in the admin interface.
|
189 |
-
*
|
190 |
* Added: Schedule downloads of the GeoIP database.
|
191 |
* Added: Auto populate missing GeoIP information after a download of the GeoIP database.
|
192 |
-
*
|
193 |
|
194 |
= 4.3.1 =
|
195 |
-
*
|
196 |
* Added: Version information to the optimization page.
|
197 |
[Thanks Greg Ross](http://profiles.wordpress.org/gregross)
|
198 |
|
@@ -201,18 +204,18 @@ The webcrawler detection code has be fixed and will now exclude them from your s
|
|
201 |
* Added: IP address and subnet exclusion support.
|
202 |
* Added: Client IP and user agent information to the optimization page.
|
203 |
* Added: Support to exclude users from data collection based on their WordPress role.
|
204 |
-
*
|
205 |
|
206 |
= 4.2 =
|
207 |
* Added: Statistical menus.
|
208 |
-
*
|
209 |
* Language: Serbian (sr_RS) was updated.
|
210 |
* Language: German (de_DE) was updated.
|
211 |
* Language: French (fr_FR) was updated.
|
212 |
|
213 |
= 4.1 =
|
214 |
* Language: Arabic (ar) was updated
|
215 |
-
*
|
216 |
* Updated: update to the spiders list.
|
217 |
|
218 |
= 4.0 =
|
@@ -229,11 +232,11 @@ The webcrawler detection code has be fixed and will now exclude them from your s
|
|
229 |
* Updated: List of webcrawlers to catch more bots.
|
230 |
* Updated: Statistics reporting options in settings no longer needs a page reload to hide/show the settings.
|
231 |
* Updated: Summary Statistcs now uses the WordPress set format for the time and date.
|
232 |
-
*
|
233 |
-
*
|
234 |
-
*
|
235 |
-
*
|
236 |
-
*
|
237 |
* Updated: Highcharts JS 3.0.1 to JS 3.0.7 version.
|
238 |
|
239 |
= 3.2 =
|
4 |
Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, yearl, total, post, page, sidebar, summary, feedburner, hits, pagerank, google, alexa, live visit
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.8
|
7 |
+
Stable tag: 4.6.1
|
8 |
License: GPL2
|
9 |
|
10 |
Complete statistics for your blog.
|
136 |
Also, if your running an internal test site with non-routable IP addresses (like 192.168.x.x or 172.28.x.x or 10.x.x.x), these addresses will come up as unknown always.
|
137 |
|
138 |
= I was using V3.2 and now that I've upgraded my visitors and visits have gone way down? =
|
139 |
+
The webcrawler detection code has be Fixes and will now exclude them from your stats, don't worry, it now reflects a more accurate view of actual visitors to your site.
|
140 |
|
141 |
== Screenshots ==
|
142 |
1. View stats page.
|
162 |
* As the webcrawler code is now working, you'll probably see a significant change in the "Unknown" browser category and the number of hits your site gets.
|
163 |
|
164 |
== Changelog ==
|
165 |
+
= 4.6.1 =
|
166 |
+
* Fixes: a Small bug in to get rid of one of the reported warnings from debug mode.
|
167 |
+
|
168 |
= 4.6 =
|
169 |
* Added: In the optimization page you can now empty all tables at once.
|
170 |
* Added: In the optimization page you can now purge statistics over a given number of days old.
|
171 |
* Added: Daily scheduled job to purge statistics over a given number of days old.
|
172 |
+
* Fixes: Bug in the robots code that on new installs failed to populate the defaults in the database.
|
173 |
+
* Fixes: All known warning messages when running in WordPress debug mode.
|
174 |
+
* Fixes: Incorrect description of co-efficient value in the setting page.
|
175 |
+
* Fixes: Top level links on the various stats pages now update highlight the current page in the admin menu instead of the overview page.
|
176 |
+
* Fixes: Install code now only executes on a true new installation instead of on each activation.
|
177 |
+
* Fixes: Bug in hits code when GeoIP was disabled, IP address would not be recorded.
|
178 |
|
179 |
= 4.5 =
|
180 |
* Added: Support for more search engines: DuckDuckGo, Baidu and Yandex.
|
184 |
* Updated: Added new bot match strings: 'archive.org_bot', 'meanpathbot', 'moreover', 'spbot'.
|
185 |
* Updated: Replaced bot match string 'ezooms.bot' with 'ezooms'.
|
186 |
* Updated: Overview summary statistics layout.
|
187 |
+
* Fixes: Bug in widget code that didn't allow you to edit the settings after adding the widget to your site.
|
188 |
|
189 |
= 4.4 =
|
190 |
* Added: option to set the required capability level to view statistics in the admin interface.
|
191 |
* Added: option to set the required capability level to manage statistics in the admin interface.
|
192 |
+
* Fixes: 'See More' links on the overview page now update highlight the current page in the admin menu instead of the overview page.
|
193 |
* Added: Schedule downloads of the GeoIP database.
|
194 |
* Added: Auto populate missing GeoIP information after a download of the GeoIP database.
|
195 |
+
* Fixes: Unschedule of report event if reporting is disabled.
|
196 |
|
197 |
= 4.3.1 =
|
198 |
+
* Fixes: Critical bug that caused only a single visitor to be recorded.
|
199 |
* Added: Version information to the optimization page.
|
200 |
[Thanks Greg Ross](http://profiles.wordpress.org/gregross)
|
201 |
|
204 |
* Added: IP address and subnet exclusion support.
|
205 |
* Added: Client IP and user agent information to the optimization page.
|
206 |
* Added: Support to exclude users from data collection based on their WordPress role.
|
207 |
+
* Fixes: A bug when the GeoIP code was disabled with optimization page.
|
208 |
|
209 |
= 4.2 =
|
210 |
* Added: Statistical menus.
|
211 |
+
* Fixes: Small bug in the geoip version.
|
212 |
* Language: Serbian (sr_RS) was updated.
|
213 |
* Language: German (de_DE) was updated.
|
214 |
* Language: French (fr_FR) was updated.
|
215 |
|
216 |
= 4.1 =
|
217 |
* Language: Arabic (ar) was updated
|
218 |
+
* Fixes: small bug in moved the GeoIP database.
|
219 |
* Updated: update to the spiders list.
|
220 |
|
221 |
= 4.0 =
|
232 |
* Updated: List of webcrawlers to catch more bots.
|
233 |
* Updated: Statistics reporting options in settings no longer needs a page reload to hide/show the settings.
|
234 |
* Updated: Summary Statistcs now uses the WordPress set format for the time and date.
|
235 |
+
* Fixes: Webcrawler detection now works and is case insensitive.
|
236 |
+
* Fixes: Install code now correctly sets defaults.
|
237 |
+
* Fixes: Upgrade code now works correctly. If you are running V3.2, your old data will be preserved, older versions will delete the tables and recreate them.
|
238 |
+
* Fixes: Ajax submissions on the optmiziation page (like the empty table function) should work in IE and other browsers that are sensitive to cross site attacks.
|
239 |
+
* Fixes: Replaced call to the dashboard code (to support the postbox widgets on the log screen) with the proper call to the postbox code as WordPress 3.8 beta 1 did not work with the old code.
|
240 |
* Updated: Highcharts JS 3.0.1 to JS 3.0.7 version.
|
241 |
|
242 |
= 3.2 =
|
wp-statistics.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Wordpress Statistics
|
4 |
Plugin URI: http://iran98.org/category/wordpress/wp-statistics/
|
5 |
Description: Complete statistics for your blog.
|
6 |
-
Version: 4.6
|
7 |
Author: Mostafa Soufi
|
8 |
Author URI: http://iran98.org/
|
9 |
Text Domain: wp_statistics
|
@@ -15,7 +15,7 @@ License: GPL2
|
|
15 |
date_default_timezone_set( get_option('timezone_string') );
|
16 |
}
|
17 |
|
18 |
-
define('WP_STATISTICS_VERSION', '4.6');
|
19 |
define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', '5.3.0' );
|
20 |
|
21 |
load_plugin_textdomain('wp_statistics', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
|
@@ -94,6 +94,7 @@ License: GPL2
|
|
94 |
global $wp_roles;
|
95 |
|
96 |
$role_list = $wp_roles->get_names();
|
|
|
97 |
|
98 |
foreach( $wp_roles->roles as $role ) {
|
99 |
|
3 |
Plugin Name: Wordpress Statistics
|
4 |
Plugin URI: http://iran98.org/category/wordpress/wp-statistics/
|
5 |
Description: Complete statistics for your blog.
|
6 |
+
Version: 4.6.1
|
7 |
Author: Mostafa Soufi
|
8 |
Author URI: http://iran98.org/
|
9 |
Text Domain: wp_statistics
|
15 |
date_default_timezone_set( get_option('timezone_string') );
|
16 |
}
|
17 |
|
18 |
+
define('WP_STATISTICS_VERSION', '4.6.1');
|
19 |
define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', '5.3.0' );
|
20 |
|
21 |
load_plugin_textdomain('wp_statistics', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
|
94 |
global $wp_roles;
|
95 |
|
96 |
$role_list = $wp_roles->get_names();
|
97 |
+
$all_caps = array();
|
98 |
|
99 |
foreach( $wp_roles->roles as $role ) {
|
100 |
|