WP Statistics - Version 12.0.2

Version Description

This is a security fix, please update immediately.

=

Download this release

Release Info

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

Code changes from version 12.0.1 to 12.0.2

changelog.txt CHANGED
@@ -1,290 +1,3 @@
1
- === WP Statistics ===
2
- Contributors: GregRoss, mostafa.s1990
3
- 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, hits, pagerank, google, alexa, live visit
5
- Requires at least: 3.0
6
- Tested up to: 4.7
7
- Stable tag: 11.0.3
8
- License: GPL3
9
-
10
- Complete statistics for your WordPress site.
11
-
12
- == Description ==
13
- A comprehensive plugin for your WordPress visitor statistics, come visit us at our [website](http://wp-statistics.com) for all the latest news and information.
14
-
15
- Track statistics for your WordPress site without depending on external services and uses arrogate data whenever possible to respect your users privacy.
16
-
17
- On screen statistics presented as graphs are easily viewed through the WordPress admin interface.
18
-
19
- This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.
20
-
21
- = Features =
22
- * Online users, visits, visitors and page statistics
23
- * Search Engines, see search queries and redirects from popular search engines like Google, Bing, DuckDuckGo, Yahoo, Yandex and Baidu
24
- * Overview and detail pages for all kinds of data, including; browser versions, country stats, hits, exclusions, referrers, searches, search words and visitors
25
- * GeoIP location by Country
26
- * Support for hashing IP addresses in the database to protect your users privacy
27
- * Interactive map of visitors location
28
- * E-mail reports of statistics
29
- * Set access level for view and manage roles based on WordPress roles
30
- * Exclude users from statistics collection based on various criteria, including; user roles, common robots, IP subnets, page URL, login page, RSS pages, admin pages, Country, number of visits per day, hostname
31
- * Record statistics on exclusions
32
- * Automatic updates to the GeoIP database
33
- * Automatically prune the databases of old data
34
- * Export the data to XML, CSV or TSV files
35
- * Widget to provide information to your users
36
- * Shortcodes for many different types of data in both widgets and posts/pages
37
- * Dashboard widgets for the admin area
38
- * Comprehensive Admin Manual
39
-
40
- = Translations =
41
- WP Statistics has been translated in to many languages, for the current list and contributors, please visit the [translators](https://wp-statistics.com/translators/) page on [wp-statistics.com](https://wp-statistics.com/).
42
-
43
- Translations are done by people just like you, help make WP Statistics available to more people around the world and [do a translation](http://wp-statistics.com/translations/) today!
44
-
45
- = Support =
46
- We're sorry you're having problem with WP Statistics and we're happy to help out. Here are a few things to do before contacting us:
47
-
48
- * Have you read the [FAQs](http://wordpress.org/plugins/wp-statistics/faq/)?
49
- * Have you read the [manual](http://plugins.svn.wordpress.org/wp-statistics/trunk/manual/WP%20Statistics%20Admin%20Manual.html)?
50
- * Have you search the [support forum](http://wordpress.org/support/plugin/wp-statistics) for a similar issue?
51
- * Have you search the Internet for any error messages you are receiving?
52
- * Make sure you have access to your PHP error logs.
53
-
54
- And a few things to double-check:
55
-
56
- * How's your memory_limit in php.ini?
57
- * Have you tried disabling any other plugins you may have installed?
58
- * Have you tried using the default WordPress theme?
59
- * Have you double checked the plugin settings?
60
- * Do you have all the required PHP extensions installed?
61
- * Are you getting a blank or incomplete page displayed in your browser? Did you view the source for the page and check for any fatal errors?
62
- * Have you checked your PHP and web server error logs?
63
-
64
- Still not having any luck? Open a new thread on one of the support forums and we'll respond as soon as possible.
65
-
66
- * [English Support Forum](http://wordpress.org/support/plugin/wp-statistics)
67
- * [Persian Support Forum](http://forum.wp-parsi.com/forum/17-%D9%85%D8%B4%DA%A9%D9%84%D8%A7%D8%AA-%D8%AF%DB%8C%DA%AF%D8%B1/)
68
-
69
- == Installation ==
70
- 1. Upload `wp-statistics` to the `/wp-content/plugins/` directory.
71
- 2. Activate the plugin through the 'Plugins' menu in WordPress.
72
- 3. Make sure the Date and Time is set correctly in WordPress.
73
- 4. Go to the plugin settings page and configure as required (note this will also download the GeoIP database for the fist time).
74
-
75
- == Frequently Asked Questions ==
76
- = Where's the Admin Manual? =
77
- The admin manual is installed as part of the plugin, simply go to Statistics->Manual to view it. At the top of the page will also be two icons that will allow you to download it in either ODT or HTML formats.
78
-
79
- = What do I do if the plug does not work? =
80
- Disable / Enable the plugin. You may also want to try removing and re-installing it as well. If it is still not working, please open a new support thread on the [WordPress support forums](http://wordpress.org/support/plugin/wp-statistics).
81
-
82
- = All visitors are being set to unknown for their location? =
83
- Make sure you've downloaded the GeoIP database and the GeoIP code is enabled.
84
-
85
- 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 unless you have defined a location in the "Country code for private IP addresses" setting.
86
-
87
- = GeoIP is enabled but no hits are being counted? =
88
- The GeoIP code requires several things to function, PHP 5.3 or above, the cURL extension and PHP cannot be running in safe mode. All of these conditions are checked for but there may be additional items required. Check your PHP log files and see if there are any fatal errors listed.
89
-
90
- = How much memory does PHP Statistics require? =
91
- This depends on how many hits your site gets. The data collection code is very light weight, however the reporting and statistics code can take a lot of memory to process. The longer you collect data for the more memory you will need to process it. At a bare minimum, a basic WordPress site with WP Statistics should have at least 32 meg of RAM available for a page load. Sites with lots of plugins and high traffic should look at significantly increasing that (128 to 256 meg is not unreasonable).
92
-
93
- = I've enabled IP subnet exclusions and now no visitors are recorded? =
94
- Be very careful to set the subnet mask correctly on the subnet list, it is very easy to catch too much traffic. Likewise if you are excluding a single IP address make sure to include a subnet mask of 32 or 255.255.255.255 otherwise you may not get the expected results.
95
-
96
- = I'm not receiving e-mail reports? =
97
- Make sure you have WordPress configured correctly for SMTP and also check your WP Cron is working correctly. You can use [Cron View](http://wordpress.org/plugins/cron-view) to examine your WP Cron table and see if there are any issues.
98
-
99
- = Does WP Statistics support multi-site? =
100
- WP Statistics doesn't officially support multi-site however it does have limited functionally associated with it and should function without issue. However no support is provided at this time.
101
-
102
- Version 8.8 is the first release that should install, upgrade and remove correctly on mutli-site as well as have some very basic support for the network admin menu. This should not be taken as an indication that WP Statistics fully supports multi-site, but only as a very preliminary first step.
103
-
104
- = Does WP Statistics report on post hits? =
105
- Yes, version 6.0 has introduced page hit statistics!
106
-
107
- = Does WP Statistics track the time of the hits? =
108
- No.
109
-
110
- = The GeoIP database isn't downloading and when I force a download through the settings page I get the following error: "Error downloading GeoIP database from: http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz - Forbidden" =
111
- This means that MaxMind has block the IP address of your webserver, this is often the case if it has been blacklisted in the past due to abuse.
112
-
113
- You have two options:
114
- - Contact MaxMind and have them unblock your IP address
115
- - Manually download the database
116
-
117
- To manually download the database and install it take the following steps:
118
-
119
- - On another system (any PC will do) download the maxmind database from http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz
120
- - Decompress the database
121
- - Connect to your web host and create a "wp-statistics" directory in your wordpress uploads folder (usually it is located in wp-content, so you would create a directory "wp-content/uploads/wp-statistics").
122
- - Upload the GeoLite-Country.mmdb file to the folder you just created.
123
-
124
- You can also ask MaxMind to unblock your host. Note that automatic updates will not function until you can successfully download the database from your web server.
125
-
126
- = I've activated the plugin but the menus don't show up and nothing happens? =
127
-
128
- WP Statistics requires PHP 5.4, if it has detected an older version of PHP installed it will active cleanly in WordPress but disable all functionality, you will have to upgrade to PHP 5.4 or above for it to function. WP Statistics will display an error at the top of your plugin list to let you know.
129
-
130
- If there is no error message there may be something else wrong, your first thing to try is disabling your other plugins as they can sometimes cause conflicts.
131
-
132
- If you still don't see the menus, go to the support forums and open a new thread and we'll try to help out.
133
-
134
- = I'm using another statistics plugin/service and get different numbers for them, why? =
135
-
136
- Pretty much every plugin/service is going to give you different results for visits and visitors, there are several reasons for this:
137
-
138
- * Web crawler detection
139
- * Detection method (javascript vs server side PHP)
140
- * Centralized exclusions
141
-
142
- Services that use centralized databases, like Google Analytics, for spam and robot detection have better detection than WP Statistics can. The trade off of course is relaying on an external service.
143
-
144
- = When I upgrade or install WP Statistics I get an error message like "Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '('" =
145
-
146
- Since WP Statistics 8.0, PHP 5.3 or above has been required. If you are using an older version of PHP it cannot understand the new syntax included in WP Statistics 8.0 and generates a parse error.
147
-
148
- Your hosting provider should have a newer version of PHP available, sometimes you must activate it through your hosting control panel.
149
-
150
- Since the last release of PHP 5.2 is over 5 years ago (Jan 2011) and is no longer supported or receiving security fixes, if your provider does not support a newer version you should probably be moving hosting providers.
151
-
152
- If you have done an upgrade and you can no longer access your site due to the parse error you will have to manually delete the wp-statistics directory from your wordpress/wp-content/plugins directory, either through your hosting providers control panel or FTP.
153
-
154
- Do not use older versions of WP Statistics as they have know security issues and will leave your site vulnerable to attack.
155
-
156
- = I've decided to stay with WP Statistics 7.4 even though its a bad idea but now WordPress continuously reports there are updates available, how can I stop that? =
157
-
158
- Don't, upgrade immediately to the latest version of WP Statistics.
159
-
160
- = Something has gone horribly wrong and my site no longer loads, how can I disable the plugin without access to the admin area? =
161
-
162
- You can manually disable plugins in WordPress by simply renaming the folder they are installed in. Using FTP or your hosting providers file manager, go to your WordPress directory, from there go to wp-content/plugins and rename or delete the wp-statistics folder.
163
-
164
- = I'm getting an error in my PHP log like: Fatal error: Call to undefined method Composer\Autoload\ClassLoader::set() =
165
-
166
- We use several libraries and use a utility called Composer to manage the dependencies between them. We try and keep our Composer library up to date but not all plugins do and sometimes we find conflicts with other plugins. Try disabling your other plugins until the error goes away and then contact that plugin developer to update their Composer files.
167
-
168
- = The search words and search engine referrals are zero or very low, what's wrong? =
169
-
170
- Search Engine Referrals and Words are highly dependent on the search engine providing the information to us and that often is not the case. Unfortunately there is nothing we can do about this, we report on everything we receive.
171
-
172
- = Why did my visits suddenly jump way up today? =
173
-
174
- There can be many reasons for this, but the most common reason is a botnet has decided to visit your site and we have been unable to filter it out. You usually see your visits spike for a few days and then they give up.
175
-
176
- = What’s the difference between Visits and Visitors? =
177
-
178
- Visits is the number of page hits your site has received.
179
-
180
- Visitors is the number of unique users that have visited your site.
181
-
182
- Visits should always be greater than Visitors (though there are a few times when this won’t be true on very low usage sites due to how the exclusion code works).
183
-
184
- The average number of pages a visitor views on your site is Visits/Visitors.
185
-
186
- = My overview screen is blank, what's wrong? =
187
-
188
- This is usually caused by a PHP fatal error, check the page source and PHP logs.
189
-
190
- The most common fatal error is an out of memory error. Check the Statistics->Optimization page and see how much memory is currently assigned to PHP.
191
-
192
- If it is a memory issue you have two choices:
193
- - Increase PHP's memory allocation
194
- - Delete some of your historical data.
195
-
196
- See http://php.net/manual/en/ini.core.php#ini.memory-limit for information about PHP's memory limit.
197
-
198
- To remove historical data you can use the Statistics->Optimization->Purging->Purge records older than.
199
-
200
- = Not all referrals are showing up in the search words list, why? =
201
-
202
- Unfortunate we're completely dependent on the search engine sending use the search parameters as part of the referrer header, which they do not always do.
203
-
204
- = Does WP Statistics work with caching plugins? =
205
-
206
- Probably not, most caching plugins don't execute the standard WordPress loop for a page it has already cached (by design of course) which means the WP Statistics code never runs for that page.
207
-
208
- This means WP Statistics can't record the page hit or visitor information, which defeats the purpose of WP Statistics.
209
-
210
- We do not recommend using a caching plugin along with WP Statistics.
211
-
212
- = I get an error message like "PHP Fatal error: Function name must be a string in /../parse-user-agent.php" =
213
-
214
- Do you have eAccelerator installed? If so this is a known issue with eAccelerator and PHP's "anonymous" functions, which are used in the user agent parsing library. As no new versions of eAccelerator have been released for over 6 years (since January 2010), you should look to replace it or disable it.
215
-
216
- = I've installed WP Statistics for the first time on a site and when I go to the statistics pages I get an error saying like "The following plugin table(s) do not exist in the database" =
217
-
218
- This is because something has gone wrong during the installation.
219
-
220
- At the end of the message will be a list of tables that are missing, you can use the provided link to re-run the installation routine. If that does not resolve the issue and the visitors table is the only table listed, you may want to check your MySQL version. Some older versions of MySQL (in the 5.0.x series) have issues with complex compound indexes, which we use on the visitors table. If this is the case, check with your hosting provider and see if they can upgrade to a newer version of MySQL.
221
-
222
- If you still have issues open a new thread on the support forum and we'll try and resolve it for you.
223
-
224
- = I've changed the permissions for WP Statistics access and now I've lost access to it myself, how to I fix it? =
225
-
226
- If you have access to phpMyAdmin (or similar tool) you can query the wp_options table:
227
-
228
- SELECT * FROM wp_options WHERE option_name = 'wp_statistics';
229
-
230
- Then edit the value, inside the string will be something like (note: "edit_plugins" will be whatever permission you selected):
231
-
232
- s:15:"read_capability";s:12:"edit_plugins";s:17:"manage_capability";s:12:"edit_plugins";
233
-
234
- Replace it with:
235
-
236
- s:15:"read_capability";s:14:"manage_options";s:17:"manage_capability";s:14:"manage_options";
237
-
238
- = I see error messages in my PHP log like "WordPress database error Duplicate entry 'YYYY-MM-DD' for key 'unique_date' for ..." =
239
-
240
- This is caused by a race condition in the code, it's safe to ignore (it shouldn't be labeled as an error really, but that is part of WordPress that we can't control).
241
-
242
- It happens when a new day starts and two visitors hit the site at nearly the same time for the first visit of the day. Both try and create a new row in the table to track the days visits, but only one of them success and the other throws this warning.
243
-
244
- = PHP 7 Support =
245
-
246
- WP Statistics is PHP 7 compliant, however some versions of PHP 7 have bugs that can cause issues. One know issue is with PHP 7.0.4 causing memory exhaustion errors, newer versions of PHP 7 do not have this issue.
247
-
248
- At this time (August 2016) WP Statistics seems to run fine with PHP 7.0.10, however you may experience issues that we haven't found yet. If you do, feel free to report it after you've confirmed it is not a problem with PHP.
249
-
250
- = IPv6 Support =
251
-
252
- WP Statistics supports IPv6 as of version 11.0, however PHP must be compiled with IPv6 support enabled, otherwise you may see warnings when a visitor from an IPv6 address hits your site.
253
-
254
- You can check if IPv6 support is enabled in PHP by visiting the "Optimization->Resources/Information->Version Info->PHP IPv6 Enabled" section.
255
-
256
- If IPv6 is not enabled, you may see an warning like:
257
-
258
- Warning: inet_pton() [function.inet-pton]: Unrecognized address 2003:0006:1507:5d71:6114:d8bd:80c2:1090
259
-
260
- = When I upgrade or install WP Statistics 11.0 I get an error message like "Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in..." =
261
-
262
- Since WP Statistics 11.0, PHP 5.4 or above has been required. If you are using an older version of PHP it cannot understand the new syntax included in WP Statistics 11.0 and generates a parse error.
263
-
264
- Your hosting provider should have a newer version of PHP available, sometimes you must activate it through your hosting control panel.
265
-
266
- Since the last release of PHP 5.3 is over 2 years ago (Aug 2014) and is no longer supported or receiving security fixes, if your provider does not support a newer version you should probably be moving hosting providers.
267
-
268
- If you have done an upgrade and you can no longer access your site due to the parse error you will have to manually delete the wp-statistics directory from your wordpress/wp-content/plugins directory, either through your hosting providers control panel or FTP.
269
-
270
- You may also downgrade to WP Statistics 10.3 as a temporary measure, but no new fixes or features will be added to that version and you should move to a newer version of PHP as soon as possible. You can download the 10.3 here: https://downloads.wordpress.org/plugin/wp-statistics.10.3.zip
271
-
272
- == Screenshots ==
273
- 1. View stats page.
274
- 2. View latest search words.
275
- 3. View recent visitors page.
276
- 4. View top referrer site page.
277
- 5. Optimization page.
278
- 6. Settings page.
279
- 7. Widget page.
280
- 8. View Top Browsers page.
281
- 9. View latest Hits Statistics page.
282
- 10. View latest search engine referrers Statistics page.
283
-
284
- == Upgrade Notice ==
285
- = 11.0 =
286
- PHP 5.4 is now required for version 11.0 and above! IPv6 is now supported if you have IPv6 support complied in to PHP, if you don't you may see warning messages if you receive visitors from IPv6 addresses (see the FAQ for more information).
287
-
288
  == Changelog ==
289
  = 11.0.3 =
290
  * Release Date: January 13, 2017
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  == Changelog ==
2
  = 11.0.3 =
3
  * Release Date: January 13, 2017
includes/classes/statistics.class.php CHANGED
@@ -724,4 +724,16 @@ class WP_Statistics {
724
 
725
  return $site_list;
726
  }
 
 
 
 
 
 
 
 
 
 
 
 
727
  }
724
 
725
  return $site_list;
726
  }
727
+
728
+ public function html_sanitize_referrer( $referrer, $length = -1 ) {
729
+ if( 'data:' == strtolower( substr( $referrer, 0, 5 ) ) ) {
730
+ $referrer = 'http://127.0.0.1';
731
+ }
732
+
733
+ if( $length > 0 ) {
734
+ $referrer = substr( $referrer, 0, $length );
735
+ }
736
+
737
+ return htmlentities( $referrer, ENT_QUOTES );
738
+ }
739
  }
includes/functions/functions.php CHANGED
@@ -935,12 +935,20 @@
935
  if( array_key_exists( 'rangestart', $_GET ) ) { $rangestart = $_GET['rangestart']; } else { $rangestart = $WP_Statistics->Current_Date( 'm/d/Y', '-' . $current ); }
936
  if( array_key_exists( 'rangeend', $_GET ) ) { $rangeend = $_GET['rangeend']; } else { $rangeend = $WP_Statistics->Current_Date( 'm/d/Y' ); }
937
 
938
- // Now get the number of days in the range.
939
  $rangestart_utime = $WP_Statistics->strtotimetz( $rangestart );
 
940
  $rangeend_utime = $WP_Statistics->strtotimetz( $rangeend );
 
 
 
941
  $daysToDisplay = (int)( ( $rangeend_utime - $rangestart_utime ) / 24 / 60 / 60 );
942
  $today = $WP_Statistics->Current_Date( 'm/d/Y' );
943
 
 
 
 
 
944
  // If the rangeend isn't today OR it is but not one of the standard range values, then it's a custom selected value and we need to flag it as such.
945
  if( $rangeend != $today || ( $rangeend == $today && ! in_array( $current, $range ) ) ) {
946
  $current = -1;
935
  if( array_key_exists( 'rangestart', $_GET ) ) { $rangestart = $_GET['rangestart']; } else { $rangestart = $WP_Statistics->Current_Date( 'm/d/Y', '-' . $current ); }
936
  if( array_key_exists( 'rangeend', $_GET ) ) { $rangeend = $_GET['rangeend']; } else { $rangeend = $WP_Statistics->Current_Date( 'm/d/Y' ); }
937
 
938
+ // Convert the text dates to unix timestamps and do some basic sanity checking.
939
  $rangestart_utime = $WP_Statistics->strtotimetz( $rangestart );
940
+ if( false === $rangestart_utime ) { $rangestart_utime = time(); }
941
  $rangeend_utime = $WP_Statistics->strtotimetz( $rangeend );
942
+ if( false === $rangeend_utime || $rangeend_utime < $rangestart_utime ) { $rangeend_utime = time(); }
943
+
944
+ // Now get the number of days in the range.
945
  $daysToDisplay = (int)( ( $rangeend_utime - $rangestart_utime ) / 24 / 60 / 60 );
946
  $today = $WP_Statistics->Current_Date( 'm/d/Y' );
947
 
948
+ // Re-create the range start/end strings from our utime's to make sure we get ride of any cruft and have them in the format we want.
949
+ $rangestart = $WP_Statistics->Local_Date( 'm/d/Y', $rangestart_utime );
950
+ $rangeend = $WP_Statistics->Local_Date( 'm/d/Y', $rangeend_utime );
951
+
952
  // If the rangeend isn't today OR it is but not one of the standard range values, then it's a custom selected value and we need to flag it as such.
953
  if( $rangeend != $today || ( $rangeend == $today && ! in_array( $current, $range ) ) ) {
954
  $current = -1;
includes/log/last-search.php CHANGED
@@ -144,7 +144,7 @@
144
 
145
  echo "<a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
146
 
147
- echo "<a href='" . htmlentities($items->referred,ENT_QUOTES) . "' title='" . htmlentities($items->referred,ENT_QUOTES) . "'>".wp_statistics_icons('dashicons-admin-links', 'link') . " " . htmlentities($items->referred,ENT_QUOTES) . "</a></div>";
148
  echo "</div>";
149
  }
150
  }
144
 
145
  echo "<a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
146
 
147
+ echo "<a href='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "' title='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "'>".wp_statistics_icons('dashicons-admin-links', 'link') . " " . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "</a></div>";
148
  echo "</div>";
149
  }
150
  }
includes/log/last-visitor.php CHANGED
@@ -125,7 +125,7 @@
125
 
126
  echo "<a href='?page=" . WP_STATISTICS_VISITORS_PAGE . "&agent={$items->agent}'>{$agent}</a>";
127
 
128
- echo "<a href='" . htmlentities($items->referred,ENT_QUOTES) . "' title='" . htmlentities($items->referred,ENT_QUOTES) . "'>" . wp_statistics_icons('dashicons-admin-links', 'link') . " " . htmlentities($items->referred,ENT_QUOTES) . "</a></div>";
129
  echo "</div>";
130
  }
131
 
125
 
126
  echo "<a href='?page=" . WP_STATISTICS_VISITORS_PAGE . "&agent={$items->agent}'>{$agent}</a>";
127
 
128
+ echo "<a href='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "' title='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "'>" . wp_statistics_icons('dashicons-admin-links', 'link') . " " . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "</a></div>";
129
  echo "</div>";
130
  }
131
 
includes/log/top-referring.php CHANGED
@@ -1,25 +1,40 @@
1
  <script type="text/javascript">
2
- jQuery(document).ready(function(){
3
- jQuery('.show-map').click(function(){
4
- alert('<?php _e('To be added soon', 'wp_statistics'); ?>');
5
- });
6
 
7
- postboxes.add_postbox_toggles(pagenow);
8
- });
9
  </script>
10
  <?php
11
- $daysToDisplay = 20;
12
- if( array_key_exists('hitdays',$_GET) ) { $daysToDisplay = intval($_GET['hitdays']); }
 
 
 
 
13
 
14
- if( array_key_exists('rangestart', $_GET ) ) { $rangestart = $_GET['rangestart']; } else { $rangestart = ''; }
15
- if( array_key_exists('rangeend', $_GET ) ) { $rangeend = $_GET['rangeend']; } else { $rangeend = ''; }
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  list( $daysToDisplay, $rangestart_utime, $rangeend_utime ) = wp_statistics_date_range_calculator( $daysToDisplay, $rangestart, $rangeend );
18
 
19
- $rangestartdate = $WP_Statistics->real_current_date('Y-m-d', '-0', $rangestart_utime );
20
- $rangeenddate = $WP_Statistics->real_current_date('Y-m-d', '-0', $rangeend_utime );
21
 
22
- if( array_key_exists('referr',$_GET) ) {
23
  $referr = $_GET['referr'];
24
  $title = $_GET['referr'];
25
  $referr_field = '&referr=' . $referr;
@@ -77,30 +92,30 @@
77
 
78
  ?>
79
  <div class="wrap">
80
- <?php screen_icon('options-general'); ?>
81
- <h2><?php _e('Top Referring Sites', 'wp_statistics'); ?></h2>
82
 
83
  <div><?php wp_statistics_date_range_selector( WP_STATISTICS_REFERRERS_PAGE, $daysToDisplay, null, null, $referr_field ); ?></div>
84
 
85
  <div class="clear"/>
86
 
87
  <ul class="subsubsub">
88
- <?php if($referr) { ?>
89
- <li class="all"><a <?php if(!$referr) { echo 'class="current"'; } ?>href="?page=<?php echo WP_STATISTICS_REFERRERS_PAGE; ?>"><?php _e('All', 'wp_statistics'); ?></a></li>
90
- | <li><a class="current" href="?page=<?php echo WP_STATISTICS_REFERRERS_PAGE; ?>&referr=<?php echo htmlentities($referr, ENT_QUOTES); ?>"> <?php echo htmlentities( $title, ENT_QUOTES ); ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
91
  <?php } else { ?>
92
- <li class="all"><a <?php if(!$referr) { echo 'class="current"'; } ?>href="?page=<?php echo WP_STATISTICS_REFERRERS_PAGE; ?>"><?php _e('All', 'wp_statistics'); ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
93
  <?php }?>
94
  </ul>
95
  <div class="postbox-container" id="last-log">
96
  <div class="metabox-holder">
97
  <div class="meta-box-sortables">
98
  <div class="postbox">
99
- <div class="handlediv" title="<?php _e('Click to toggle', 'wp_statistics'); ?>"><br /></div>
100
- <?php if($referr) { ?>
101
- <h3 class="hndle"><span><?php _e('Referring sites from', 'wp_statistics'); ?>: <?php echo htmlentities($referr, ENT_QUOTES); ?></span></h3>
102
  <?php } else { ?>
103
- <h3 class="hndle"><span><?php _e('Top Referring Sites', 'wp_statistics'); ?></span></h3>
104
  <?php } ?>
105
  <div class="inside">
106
  <?php
@@ -109,13 +124,13 @@
109
  if( $total > 0 ) {
110
  // Initiate pagination object with appropriate arguments
111
  $pagesPerSection = 10;
112
- $options = array(25, "All");
113
  $stylePageOff = "pageOff";
114
  $stylePageOn = "pageOn";
115
  $styleErrors = "paginationErrors";
116
  $styleSelect = "paginationSelect";
117
 
118
- $Pagination = new WP_Statistics_Pagination($total, $pagesPerSection, $options, false, $stylePageOff, $stylePageOn, $styleErrors, $styleSelect);
119
 
120
  $start = $Pagination->getEntryStart();
121
  $end = $Pagination->getEntryEnd();
@@ -125,29 +140,29 @@
125
  }
126
 
127
  if( $referr ) {
128
- foreach($result as $item) {
129
 
130
  echo "<div class='log-item'>";
131
  echo "<div class='log-referred'><a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&ip={$item->ip}'>".wp_statistics_icons('dashicons-visibility', 'visibility')."{$item->ip}</a></div>";
132
- echo "<div class='log-ip'>" . date(get_option('date_format'), strtotime($item->last_counter)) . " - <a href='http://www.geoiptool.com/en/?IP={$item->ip}' target='_blank'>{$item->ip}</a></div>";
133
  echo "<div class='clear'></div>";
134
- echo "<a class='show-map' title='".__('Map', 'wp_statistics')."'><div class='dashicons dashicons-location-alt'></div></a>";
135
 
136
- if( array_search( strtolower( $item->agent ), array( "chrome", "firefox", "msie", "opera", "safari" ) ) !== FALSE ){
137
- $agent = "<img src='".plugins_url('wp-statistics/assets/images/').$item->agent.".png' class='log-tools' title='{$item->agent}'/>";
138
  } else {
139
  $agent = "<div class='dashicons dashicons-editor-help'></div>";
140
  }
141
 
142
  echo "<div class='log-agent'><a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$item->agent}'>{$agent}</a>";
143
 
144
- echo "<a href='" . htmlentities($item->referred,ENT_QUOTES) . "'><div class='dashicons dashicons-admin-links'></div> " . htmlentities(substr($item->referred, 0, 100),ENT_QUOTES) . "[...]</a></div>";
145
  echo "</div>";
146
 
147
  }
148
  } else {
149
  arsort( $get_urls );
150
- $get_urls = array_slice($get_urls, $start, $end);
151
 
152
  $i = 0;
153
  foreach( $get_urls as $items => $value) {
@@ -155,24 +170,24 @@
155
  $i++;
156
 
157
  echo "<div class='log-item'>";
158
- echo "<div class='log-referred'>{$i} - <a href='?page=" . WP_STATISTICS_REFERRERS_PAGE . "&referr={$items}'>{$items}</a></div>";
159
- echo "<div class='log-ip'>".__('References', 'wp_statistics').": " . number_format_i18n($value) . "</div>";
160
  echo "<div class='clear'></div>";
161
- echo "<div class='log-url'><a href='http://" . htmlentities($items,ENT_QUOTES) . "/' title='" . htmlentities($items,ENT_QUOTES) . "'><div class='dashicons dashicons-admin-links'></div> http://" . htmlentities($items,ENT_QUOTES) . "/</a></div>";
162
  echo "</div>";
163
 
164
  }
165
  }
166
  }
167
 
168
- echo "</div>";
169
  ?>
170
  </div>
171
  </div>
172
 
173
  <div class="pagination-log">
174
  <?php if( $total > 0 ) { echo $Pagination->display(); ?>
175
- <p id="result-log"><?php echo ' ' . __('Page', 'wp_statistics') . ' ' . $Pagination->getCurrentPage() . ' ' . __('From', 'wp_statistics') . ' ' . $Pagination->getTotalPages(); ?></p>
176
  <?php } ?>
177
  </div>
178
  </div>
1
  <script type="text/javascript">
2
+ jQuery( document ).ready( function() {
3
+ jQuery( '.show-map' ).click( function() {
4
+ alert( '<?php _e( 'To be added soon', 'wp_statistics' ); ?>' );
5
+ } );
6
 
7
+ postboxes.add_postbox_toggles( pagenow );
8
+ } );
9
  </script>
10
  <?php
11
+ $date_args = '';
12
+ $daysToDisplay = 20;
13
+ if( array_key_exists( 'hitdays', $_GET ) ) {
14
+ $daysToDisplay = intval( $_GET['hitdays'] );
15
+ $date_args .= '&hitdays=' . $daysToDisplay;
16
+ }
17
 
18
+ if( array_key_exists( 'rangestart', $_GET ) ) {
19
+ $rangestart = $_GET['rangestart'];
20
+ $date_args .= '&rangestart=' . $rangestart;
21
+ } else {
22
+ $rangestart = '';
23
+ }
24
+
25
+ if( array_key_exists( 'rangeend', $_GET ) ) {
26
+ $rangeend = $_GET['rangeend'];
27
+ $date_args .= '&rangeend=' . $rangeend;
28
+ } else {
29
+ $rangeend = '';
30
+ }
31
 
32
  list( $daysToDisplay, $rangestart_utime, $rangeend_utime ) = wp_statistics_date_range_calculator( $daysToDisplay, $rangestart, $rangeend );
33
 
34
+ $rangestartdate = $WP_Statistics->real_current_date( 'Y-m-d', '-0', $rangestart_utime );
35
+ $rangeenddate = $WP_Statistics->real_current_date( 'Y-m-d', '-0', $rangeend_utime );
36
 
37
+ if( array_key_exists( 'referr', $_GET ) ) {
38
  $referr = $_GET['referr'];
39
  $title = $_GET['referr'];
40
  $referr_field = '&referr=' . $referr;
92
 
93
  ?>
94
  <div class="wrap">
95
+ <?php screen_icon( 'options-general' ); ?>
96
+ <h2><?php _e( 'Top Referring Sites', 'wp_statistics' ); ?></h2>
97
 
98
  <div><?php wp_statistics_date_range_selector( WP_STATISTICS_REFERRERS_PAGE, $daysToDisplay, null, null, $referr_field ); ?></div>
99
 
100
  <div class="clear"/>
101
 
102
  <ul class="subsubsub">
103
+ <?php if( $referr ) { ?>
104
+ <li class="all"><a <?php if( !$referr ) { echo 'class="current"'; } ?>href="?page=<?php echo WP_STATISTICS_REFERRERS_PAGE . $date_args; ?>"><?php _e( 'All', 'wp_statistics' ); ?></a></li>
105
+ | <li><a class="current" href="?page=<?php echo WP_STATISTICS_REFERRERS_PAGE; ?>&referr=<?php echo $WP_Statistics->html_sanitize_referrer( $referr ) . $date_args; ?>"> <?php echo htmlentities( $title, ENT_QUOTES ); ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
106
  <?php } else { ?>
107
+ <li class="all"><a <?php if( !$referr ) { echo 'class="current"'; } ?>href="?page=<?php echo WP_STATISTICS_REFERRERS_PAGE . $date_args; ?>"><?php _e( 'All', 'wp_statistics' ); ?> <span class="count">(<?php echo $total; ?>)</span></a></li>
108
  <?php }?>
109
  </ul>
110
  <div class="postbox-container" id="last-log">
111
  <div class="metabox-holder">
112
  <div class="meta-box-sortables">
113
  <div class="postbox">
114
+ <div class="handlediv" title="<?php _e( 'Click to toggle', 'wp_statistics' ); ?>"><br /></div>
115
+ <?php if( $referr ) { ?>
116
+ <h3 class="hndle"><span><?php _e( 'Referring sites from', 'wp_statistics' ); ?>: <?php echo $WP_Statistics->html_sanitize_referrer( $referr ); ?></span></h3>
117
  <?php } else { ?>
118
+ <h3 class="hndle"><span><?php _e( 'Top Referring Sites', 'wp_statistics' ); ?></span></h3>
119
  <?php } ?>
120
  <div class="inside">
121
  <?php
124
  if( $total > 0 ) {
125
  // Initiate pagination object with appropriate arguments
126
  $pagesPerSection = 10;
127
+ $options = array( 25, "All" );
128
  $stylePageOff = "pageOff";
129
  $stylePageOn = "pageOn";
130
  $styleErrors = "paginationErrors";
131
  $styleSelect = "paginationSelect";
132
 
133
+ $Pagination = new WP_Statistics_Pagination( $total, $pagesPerSection, $options, false, $stylePageOff, $stylePageOn, $styleErrors, $styleSelect );
134
 
135
  $start = $Pagination->getEntryStart();
136
  $end = $Pagination->getEntryEnd();
140
  }
141
 
142
  if( $referr ) {
143
+ foreach( $result as $item ) {
144
 
145
  echo "<div class='log-item'>";
146
  echo "<div class='log-referred'><a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&ip={$item->ip}'>".wp_statistics_icons('dashicons-visibility', 'visibility')."{$item->ip}</a></div>";
147
+ echo "<div class='log-ip'>" . date( get_option( 'date_format' ), strtotime( $item->last_counter ) ) . " - <a href='http://www.geoiptool.com/en/?IP={$item->ip}' target='_blank'>{$item->ip}</a></div>";
148
  echo "<div class='clear'></div>";
149
+ echo "<a class='show-map' title='" . __( 'Map', 'wp_statistics' ) . "'><div class='dashicons dashicons-location-alt'></div></a>";
150
 
151
+ if( array_search( strtolower( $item->agent ), array( 'chrome', 'firefox', 'msie', 'opera', 'safari' ) ) !== FALSE ){
152
+ $agent = "<img src='" . plugins_url( 'wp-statistics/assets/images/' ) . $item->agent . ".png' class='log-tools' title='{$item->agent}'/>";
153
  } else {
154
  $agent = "<div class='dashicons dashicons-editor-help'></div>";
155
  }
156
 
157
  echo "<div class='log-agent'><a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$item->agent}'>{$agent}</a>";
158
 
159
+ echo "<a href='" . $WP_Statistics->html_sanitize_referrer( $item->referred ) . "'><div class='dashicons dashicons-admin-links'></div> " . $WP_Statistics->html_sanitize_referrer( $item->referred, 100 ) . "[...]</a></div>";
160
  echo "</div>";
161
 
162
  }
163
  } else {
164
  arsort( $get_urls );
165
+ $get_urls = array_slice( $get_urls, $start, $end );
166
 
167
  $i = 0;
168
  foreach( $get_urls as $items => $value) {
170
  $i++;
171
 
172
  echo "<div class='log-item'>";
173
+ echo "<div class='log-referred'>{$i} - <a href='?page=" . WP_STATISTICS_REFERRERS_PAGE . "&referr={$items}" . $date_args . "'>{$items}</a></div>";
174
+ echo "<div class='log-ip'>" . __( 'References', 'wp_statistics' ) . ': ' . number_format_i18n( $value ) . '</div>';
175
  echo "<div class='clear'></div>";
176
+ echo "<div class='log-url'><a href='http://" . $WP_Statistics->html_sanitize_referrer( $items ) . "/' title='" . $WP_Statistics->html_sanitize_referrer( $items ) . "'><div class='dashicons dashicons-admin-links'></div> http://" . $WP_Statistics->html_sanitize_referrer( $items ) . '/</a></div>';
177
  echo "</div>";
178
 
179
  }
180
  }
181
  }
182
 
183
+ echo '</div>';
184
  ?>
185
  </div>
186
  </div>
187
 
188
  <div class="pagination-log">
189
  <?php if( $total > 0 ) { echo $Pagination->display(); ?>
190
+ <p id="result-log"><?php echo ' ' . __( 'Page', 'wp_statistics' ) . ' ' . $Pagination->getCurrentPage() . ' ' . __( 'From', 'wp_statistics' ) . ' ' . $Pagination->getTotalPages(); ?></p>
191
  <?php } ?>
192
  </div>
193
  </div>
includes/log/widgets/recent.php CHANGED
@@ -38,7 +38,7 @@
38
 
39
  echo "<a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
40
 
41
- echo "<a href='" . htmlentities($items->referred,ENT_QUOTES) . "' title='" . htmlentities($items->referred,ENT_QUOTES) . "'>".wp_statistics_icons('dashicons-admin-links', 'link') . " " . htmlentities($items->referred,ENT_QUOTES) . "</a></div>";
42
  echo "</div>";
43
  }
44
 
38
 
39
  echo "<a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
40
 
41
+ echo "<a href='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "' title='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "'>".wp_statistics_icons('dashicons-admin-links', 'link') . " " . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "</a></div>";
42
  echo "</div>";
43
  }
44
 
includes/log/widgets/referring.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- function wp_statistics_generate_referring_postbox_content($count = 10) {
3
 
4
  global $wpdb, $WP_Statistics;
5
 
@@ -7,33 +7,49 @@
7
  $urls = array();
8
  $start = 0;
9
 
10
- do {
11
- $result = $wpdb->get_results( "SELECT referred FROM {$wpdb->prefix}statistics_visitor WHERE referred <> '' LIMIT {$start}, 10000" );
12
-
13
- $start += count( $result );
14
-
15
- foreach( $result as $item ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
- $url = parse_url($item->referred);
18
 
19
- if( empty($url['host']) || stristr(get_bloginfo('url'), $url['host']) )
20
- continue;
21
 
22
- $urls[] = $url['host'];
23
- }
 
 
 
 
 
 
24
 
25
- } while( 10000 == count( $result ) );
26
-
27
- $get_urls = array_count_values($urls);
28
 
29
  arsort( $get_urls );
30
- $get_urls = array_slice($get_urls, 0, $count);
31
 
32
  ?>
33
  <table width="100%" class="widefat table-stats" id="last-referrer">
34
  <tr>
35
- <td width="10%"><?php _e('References', 'wp_statistics'); ?></td>
36
- <td width="90%"><?php _e('Address', 'wp_statistics'); ?></td>
37
  </tr>
38
 
39
  <?php
@@ -41,8 +57,8 @@
41
  foreach( $get_urls as $items => $value) {
42
 
43
  echo "<tr>";
44
- echo "<td><a href='?page=" . WP_STATISTICS_REFERRERS_PAGE . "&referr=" . htmlentities($items,ENT_QUOTES) . "'>" . number_format_i18n($value) . "</a></td>";
45
- echo "<td><a href='http://" . htmlentities($items,ENT_QUOTES) . "' target='_blank'>" . htmlentities($items,ENT_QUOTES) . " " . wp_statistics_icons('dashicons-admin-links', 'link') . "</a></td>";
46
  echo "</tr>";
47
  }
48
  ?>
1
  <?php
2
+ function wp_statistics_generate_referring_postbox_content( $count = 10 ) {
3
 
4
  global $wpdb, $WP_Statistics;
5
 
7
  $urls = array();
8
  $start = 0;
9
 
10
+ if( $WP_Statistics->get_option( 'search_converted' ) ) {
11
+ do {
12
+ $result = $wpdb->get_results( "SELECT host FROM {$wpdb->prefix}statistics_search WHERE host <> '' LIMIT {$start}, 10000" );
13
+
14
+ $start += count( $result );
15
+
16
+ foreach( $result as $item ) {
17
+ if( empty( $item->host ) || stristr( get_bloginfo( 'url' ), $item->host ) ) {
18
+ continue;
19
+ }
20
+
21
+ $urls[] = $item->host;
22
+ }
23
+ } while( 10000 == count( $result ) );
24
+ } else {
25
+ do {
26
+ $result = $wpdb->get_results( "SELECT referred FROM {$wpdb->prefix}statistics_visitor WHERE referred <> '' LIMIT {$start}, 10000" );
27
+
28
+ $start += count( $result );
29
 
30
+ foreach( $result as $item ) {
31
 
32
+ $url = parse_url( $item->referred );
 
33
 
34
+ if( empty( $url['host'] ) || stristr( get_bloginfo( 'url' ), $url['host'] ) )
35
+ continue;
36
+
37
+ $urls[] = $url['host'];
38
+ }
39
+
40
+ } while( 10000 == count( $result ) );
41
+ }
42
 
43
+ $get_urls = array_count_values( $urls );
 
 
44
 
45
  arsort( $get_urls );
46
+ $get_urls = array_slice( $get_urls, 0, $count );
47
 
48
  ?>
49
  <table width="100%" class="widefat table-stats" id="last-referrer">
50
  <tr>
51
+ <td width="10%"><?php _e( 'References', 'wp_statistics' ); ?></td>
52
+ <td width="90%"><?php _e( 'Address', 'wp_statistics' ); ?></td>
53
  </tr>
54
 
55
  <?php
57
  foreach( $get_urls as $items => $value) {
58
 
59
  echo "<tr>";
60
+ echo "<td><a href='?page=" . WP_STATISTICS_REFERRERS_PAGE . "&referr=" . $WP_Statistics->html_sanitize_referrer( $items ) . "'>" . number_format_i18n($value) . "</a></td>";
61
+ echo "<td><a href='http://" . $WP_Statistics->html_sanitize_referrer( $items ) . "' target='_blank'>" . $WP_Statistics->html_sanitize_referrer( $items ) . " " . wp_statistics_icons('dashicons-admin-links', 'link') . "</a></td>";
62
  echo "</tr>";
63
  }
64
  ?>
includes/log/widgets/words.php CHANGED
@@ -56,7 +56,7 @@
56
 
57
  echo "<a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
58
 
59
- echo "<a href='" . htmlentities($items->referred,ENT_QUOTES) . "' title='" . htmlentities($items->referred,ENT_QUOTES) . "'>" . wp_statistics_icons('dashicons-admin-links', 'link') . " " . htmlentities($items->referred,ENT_QUOTES) . "</a></div>";
60
  echo "</div>";
61
  }
62
 
56
 
57
  echo "<a href='?page=" . WP_STATISTICS_OVERVIEW_PAGE . "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
58
 
59
+ echo "<a href='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "' title='" . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "'>" . wp_statistics_icons('dashicons-admin-links', 'link') . " " . $WP_Statistics->html_sanitize_referrer( $items->referred ) . "</a></div>";
60
  echo "</div>";
61
  }
62
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp-statistics.com/donate/
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.7
7
- Stable tag: 12.0.1
8
  License: GPL3
9
 
10
  Complete statistics for your WordPress site.
@@ -283,15 +283,22 @@ You may also downgrade to WP Statistics 10.3 as a temporary measure, but no new
283
  10. View latest search engine referrers Statistics page.
284
 
285
  == Upgrade Notice ==
286
- = 12.0 =
287
- PHP 5.4 is now required for version 11.0 and above!
288
 
289
  == Changelog ==
 
 
 
 
 
 
 
290
  = 12.0.1 =
291
  * Release Date: March 24, 2017
292
  * Added: Check for BCMath or GMP Math extensions to support newer GeoIP database files.
293
  * Fixed: Robots list not being updated on upgrades properly in some cases.
294
- * Fixed: wp_statistics_get_uri() to handle cases where site and home uri's are different.
295
  * Fixed: wp_statistics_get_uri() to validate what is being removed to make sure we don't remove the wrong things.
296
  * Fixed: Display of individual referring site stats.
297
 
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.7
7
+ Stable tag: 12.0.2
8
  License: GPL3
9
 
10
  Complete statistics for your WordPress site.
283
  10. View latest search engine referrers Statistics page.
284
 
285
  == Upgrade Notice ==
286
+ = 12.0.2 =
287
+ This is a security fix, please update immediately.
288
 
289
  == Changelog ==
290
+ = 12.0.2 =
291
+ * Release Date: March 30, 2017
292
+ * Fixed: Top referrer widget was not using the new search table.
293
+ * Fixed: On the referrers page, selecting a host would reset the date range.
294
+ * Fixed: XSS issue with date range picker, thanks Anon submitter to JPCERT/CC Vulnerability Handling Team.
295
+ * Fixed: XSS issue with referrers, thanks Gen Sato who submitted to JPCERT/CC Vulnerability Handling Team.
296
+
297
  = 12.0.1 =
298
  * Release Date: March 24, 2017
299
  * Added: Check for BCMath or GMP Math extensions to support newer GeoIP database files.
300
  * Fixed: Robots list not being updated on upgrades properly in some cases.
301
+ * Fixed: wp_statistics_get_uri() to handle cases where site and home URI's are different.
302
  * Fixed: wp_statistics_get_uri() to validate what is being removed to make sure we don't remove the wrong things.
303
  * Fixed: Display of individual referring site stats.
304
 
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: 12.0.1
7
  * Author: Greg Ross & Mostafa Soufi
8
  * Author URI: http://wp-statistics.com/
9
  * Text Domain: wp_statistics
@@ -12,7 +12,7 @@
12
  */
13
 
14
  // These defines are used later for various reasons.
15
- define('WP_STATISTICS_VERSION', '12.0.1');
16
  define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
17
  define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.4.0');
18
  define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: http://wp-statistics.com/
5
  * Description: Complete statistics for your WordPress site.
6
+ * Version: 12.0.2
7
  * Author: Greg Ross & Mostafa Soufi
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', '12.0.2');
16
  define('WP_STATISTICS_MANUAL', 'manual/WP Statistics Admin Manual.');
17
  define('WP_STATISTICS_REQUIRED_PHP_VERSION', '5.4.0');
18
  define('WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION);