Statify - Version 1.5.1

Version Description

Download this release

Release Info

Developer Bueltge
Plugin Icon 128x128 Statify
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

Files changed (4) hide show
  1. CHANGELOG.md +108 -0
  2. inc/statify_frontend.class.php +7 -3
  3. readme.txt +65 -63
  4. statify.php +2 -3
CHANGELOG.md ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
3
+
4
+ ## 1.5.1 / 2017-05-04
5
+ * Bugfix: Consider filter for skipping tracking correctly if JavaScript tracking is disabled.
6
+ * Bugfix: PHP Notice for empty blacklist value.
7
+
8
+ ## 1.5.0 / 2017-03-23
9
+ * Switched to minimal PHP version 5.3
10
+ * Added more flexible settings for period of data saving and the number of entries shown in top lists
11
+ * Added validation of form data before saving settings
12
+ * Moved all documentation to [wordpress.org](https://wordpress.org/plugins/statify/).
13
+ * Added optional referrer spam protection (can be activated via the Statify settings).
14
+ * Improved conformance to the WordPress coding guidelines
15
+ * Bugfix for multi-site installations: Don't track network admin url.
16
+ * Changed hook name `statify_skip_tracking` to `statify__skip_tracking`.
17
+
18
+ ## 1.4.3 / 15.08.2016
19
+ * Corrected tracking and display in Multisite
20
+ * Minor CSS fixes in the dashboard widget
21
+ * Removed deprecated links and updated URLs for donate and wiki links
22
+ * Administrative updates to plugin header and README
23
+ * Updated [plugin authors](https://gist.github.com/glueckpress/f058c0ab973d45a72720)
24
+
25
+ ## 1.4.2 / 01.05.2015
26
+ * Replace `filter_has_var(INPUT_SERVER)` calls with `isset($_SERVER[])` ([why](https://github.com/wp-stream/stream/issues/254))
27
+
28
+ ## 1.4.1 / 29.04.2015
29
+ * Renew the tracking mechanism
30
+
31
+ ## 1.4.0 / 16.04.2015
32
+ * WordPress 4.2 support
33
+ * Plugin-wide code refactoring
34
+ * Translations for English and Russian
35
+ * [GitHub Repository](https://github.com/pluginkollektiv/statify)
36
+
37
+ ## 1.3.0 / 28.04.2014
38
+ * Sourcecode optimization for plugin-finalization
39
+
40
+ ## 1.2.8 / 19.04.2014
41
+ * JavaScript-Snippet: Relative Path for HTTP(S)-calls
42
+
43
+ ## 1.2.7 / 09.04.2014
44
+ * Support for WordPress 3.9
45
+ * Correction of dashboard links (if WordPress is in subfolder)
46
+
47
+ ## 1.2.6 / 12.12.2013
48
+ * Optimization for WordPress 3.8
49
+ * Control of tracking via `statify_skip_tracking`
50
+
51
+ ## 1.2.5 / 22.08.2013
52
+ * Migration of chart-software
53
+
54
+ ## 1.2.4 / 06.08.2013
55
+ * Compatibility to WordPress 3.6
56
+
57
+ ## 1.2.3 / 06.06.2013
58
+ * Additional protection of PHP classes against direct access
59
+ * Replacement for Deprecated [User Levels](http://codex.wordpress.org/Roles_and_Capabilities#User_Levels)
60
+
61
+ ## 1.2.2 / 14.03.2013
62
+ * No-Cache and No-Content Header for optional Count JavaScript
63
+
64
+ ## 1.2.1 / 18.12.2012
65
+ * Additional periods (up to one year) for statistics
66
+ * WordPress 3.4 as requirement
67
+
68
+ ## 1.2 / 29.11.2012
69
+ * Specially for Chrome Browser developed Statify App (discontinued)
70
+ * Fix for introduced XML-RPC-interface
71
+
72
+ ## 1.1 / 23.11.2012
73
+ * WordPress 3.5 Support
74
+ * Interface via XML-RPC
75
+ * Refactoring of Code Base
76
+ * Revision of Online Documentation
77
+ * Optional Tracking via JavaScript for Caching-Plugins
78
+
79
+ ## 1.0 / 12.06.2012
80
+ * WordPress 3.4 Support
81
+ * [Official Plugin Website](http://statify.de "Statify WordPress Stats")
82
+ * Uncompressed Version of Source Codes
83
+
84
+ ## 0.9 / 23.12.2011
85
+ * Xmas Edition
86
+
87
+ ## 0.8 / 14.12.2011
88
+ * Support für WordPress 3.3
89
+ * Display of Dashboard Widgets also for authors
90
+ * Direct Link to settings on dashboard
91
+ * Filtering der Targets/Referrer on the current date
92
+
93
+ ## 0.7 / 05.07.2011
94
+ * Replacement of Statistic Days
95
+ * Recolouring of Statistics Mark
96
+ * Ignoring XML-RPC-Requests
97
+
98
+ ## 0.6 / 22.06.2011
99
+ * Support for WordPress 3.2
100
+ * Support for WordPress Multisite
101
+ * Adjustment of redundant URL parameters of target pages
102
+ * Interaktive Statistics with further informations
103
+
104
+ ## 0.5 / 15.05.2011
105
+ * Fix: query for missing referrer in dashboard widget
106
+
107
+ ## 0.4 / 16.03.2011
108
+ * Statify goes online
inc/statify_frontend.class.php CHANGED
@@ -42,6 +42,11 @@ class Statify_Frontend extends Statify {
42
  return self::_jump_out( $is_snippet );
43
  }
44
 
 
 
 
 
 
45
  /* Global vars */
46
  global $wpdb, $wp_rewrite;
47
 
@@ -146,10 +151,9 @@ class Statify_Frontend extends Statify {
146
  * @return bool
147
  */
148
  private static function check_referrer() {
149
- // Return false if the blacklist filter is inactive.
150
- $is_filter_reffer = get_option( 'statify' );
151
 
152
- if ( ! $is_filter_reffer['blacklist'] ) {
 
153
  return false;
154
  }
155
 
42
  return self::_jump_out( $is_snippet );
43
  }
44
 
45
+ /* Check whether tracking should be skipped for this view. */
46
+ if ( self::_skip_tracking() ) {
47
+ return false;
48
+ }
49
+
50
  /* Global vars */
51
  global $wpdb, $wp_rewrite;
52
 
151
  * @return bool
152
  */
153
  private static function check_referrer() {
 
 
154
 
155
+ // Return false if the blacklist filter is inactive.
156
+ if ( ! self::$_options['blacklist'] ) {
157
  return false;
158
  }
159
 
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
  * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
4
  * Tags: analytics, dashboard, pageviews, privacy, statistics, stats, visits, web stats, widget
5
  * Requires at least: 3.9
6
- * Tested up to: 4.7.3
7
- * Stable tag: 1.5.0
8
  * License: GPLv3 or later
9
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -12,97 +12,50 @@ Visitor statistics for WordPress with focus on data protection, transparency and
12
 
13
 
14
  ## Description ##
15
- The free and ad-free plugin Statify pursues a simple objective: to provide a straightforward and compact access to the number of site views.
16
-
17
- No frills. No Cookies. No third party. No storage of personal data. No endless data privacy statements.
18
 
19
  An interactive chart is followed by lists of the most common reference sources and target pages. The period of statistics and length of lists can be set directly in the dashboard widget.
20
 
21
  ### Data Privacy ###
22
  In direct comparison to statistics services such as *Google Analytics*, *WordPress.com Stats* and *Piwik* *Statify* doesn't process and store personal data as e.g. IP addresses – *Statify* counts site views, not visitors.
 
23
  Absolute privacy compliance coupled with transparent procedures: A locally in WordPress created database table consists of only four fields (ID, date, source, target) and can be viewed at any time, cleaned up and cleared by the administrator.
24
 
25
- ### Settings and Hooks ###
26
  The plugin configuration can be changed directly in the *Statify* Widget on the dashboard by clicking the *Configure* link.
27
 
28
- #### Period of data saving ####
29
- *Statify* stores the data only for a limited period (default: two weeks), longer intervals can be selected as option in the widget.
30
- Data which is older than the selected period is deleted by a daily cron job.
31
- An increase in the database volume can be expected because all statistic values are collected and managed in the local WordPress database (expecially if you increase the period of data saving).
32
-
33
- #### Display of the widget ####
34
- The amount of links shown in the *Statify* Widget can be set as well as the option to only count views from today.
35
- Of course, older entries are not deleted when changing this setting.
36
 
37
  The statistics for the dashboard widget are cached for four minutes.
38
 
39
- Per default only administrators can see the widget. This can be changed with the `statify__user_can_see_stats` hook.
40
-
41
- Example:
42
- `
43
- add_filter(
44
- 'statify__user_can_see_stats',
45
- '__return_true'
46
- );
47
- `
48
-
49
- has to be added to the theme's `functions.php` and adapted to your needs. This example would allow all users to see the widget.
50
 
51
- Editing the configuration is still limited to users with `edit_dashboard` capability.
52
 
53
- #### JavaScript tracking for caching compatibility ####
54
- For compatibility with caching plugins like [Cachify](http://cachify.de) *Statify* offers an optional switchable tracking via JavaScript.
55
- This function allows reliable count of cached blog pages.
56
 
57
  For this to work correctly, the active theme has to call `wp_footer()`, typically in a file named `footer.php`.
58
 
59
- #### Skip tracking for spam referrers ####
60
  The comment blacklist can be enabled to skip tracking for views with a referrer URL listed in comment blacklist, i. e. which considered as spam.
61
 
62
- #### Skip tracking for defined users or pages ####
63
- The conditions for tracking views can be customized according to page type and user capabilities by using the hook `statify__skip_tracking`.
64
-
65
- Example:
66
- `
67
- add_filter(
68
- 'statify__skip_tracking',
69
- function() {
70
- if ( condition ) {
71
- return true;
72
- }
73
-
74
- return false;
75
- }
76
- );
77
- `
78
-
79
- has to be added to the theme's `functions.php`. The condition has modified such that the method returns true if and only if the view should be ignored.
80
-
81
  ### Support ###
82
- * Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/statify)
83
- * We don’t handle support via e-mail, Twitter, GitHub issues etc.
84
 
85
  ### Contribute ###
86
  * Active development of this plugin is handled [on GitHub](https://github.com/pluginkollektiv/statify).
87
  * Pull requests for documented bugs are highly appreciated.
88
- * If you think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the [support forums](https://wordpress.org/support/plugin/statify) first.
89
  * If you want to help us translate this plugin you can do so [on WordPress Translate](https://translate.wordpress.org/projects/wp-plugins/statify).
90
 
91
- ### Credits ###
92
- * Author: [Sergej Müller](https://sergejmueller.github.io/)
93
- * Maintainers: [pluginkollektiv](http://pluginkollektiv.org/)
94
 
 
95
 
96
- ## Installation ##
97
- * If you don’t know how to install a plugin for WordPress, [here’s how](https://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
98
-
99
- ### Requirements ###
100
  * PHP 5.3 or greater
101
  * WordPress 3.9 or greater
102
 
103
-
104
- ## Frequently Asked Questions ##
105
-
106
  ### Which areas are excluded from counting? ###
107
  *Statify* does not count the following views:
108
 
@@ -119,11 +72,54 @@ This behavior can be modified with the `statify__skip_tracking` hook.
119
  Some plugin users want to capture additional visitor data, e.g. name of the device and resolution.
120
  *Statify* counts exclusively page views and no visitors, the desired data acquisition is not a question.
121
 
 
 
122
 
123
- ## Changelog ##
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  You can find the full changelog in [our GitHub repository](https://github.com/pluginkollektiv/statify/blob/master/CHANGELOG.md).
126
 
 
 
 
 
127
  ### 1.5.0 (2017-03-23) ###
128
  * Switched to minimal PHP version 5.3
129
  * Added more flexible settings for period of data saving and the number of entries shown in top lists
@@ -162,6 +158,12 @@ You can find the full changelog in [our GitHub repository](https://github.com/pl
162
  For the complete changelog, check out our [GitHub repository](https://github.com/pluginkollektiv/statify).
163
 
164
 
 
 
 
 
 
 
165
  ## Screenshots ##
166
  1. Statify dashboard widget
167
  2. Statify dashboard widget options
3
  * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
4
  * Tags: analytics, dashboard, pageviews, privacy, statistics, stats, visits, web stats, widget
5
  * Requires at least: 3.9
6
+ * Tested up to: 4.7
7
+ * Stable tag: 1.5.1
8
  * License: GPLv3 or later
9
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
12
 
13
 
14
  ## Description ##
15
+ Statify provides a straightforward and compact access to the number of site views. It is privacy-friendly as it uses neither cookies nor a third party.
 
 
16
 
17
  An interactive chart is followed by lists of the most common reference sources and target pages. The period of statistics and length of lists can be set directly in the dashboard widget.
18
 
19
  ### Data Privacy ###
20
  In direct comparison to statistics services such as *Google Analytics*, *WordPress.com Stats* and *Piwik* *Statify* doesn't process and store personal data as e.g. IP addresses – *Statify* counts site views, not visitors.
21
+
22
  Absolute privacy compliance coupled with transparent procedures: A locally in WordPress created database table consists of only four fields (ID, date, source, target) and can be viewed at any time, cleaned up and cleared by the administrator.
23
 
24
+ ### Display of the widget ###
25
  The plugin configuration can be changed directly in the *Statify* Widget on the dashboard by clicking the *Configure* link.
26
 
27
+ The amount of links shown in the *Statify* Widget can be set as well as the option to only count views from today. Of course, older entries are not deleted when changing this setting.
 
 
 
 
 
 
 
28
 
29
  The statistics for the dashboard widget are cached for four minutes.
30
 
31
+ ### Period of data saving ###
32
+ *Statify* stores the data only for a limited period (default: two weeks), longer intervals can be selected as option in the widget. Data which is older than the selected period is deleted by a daily cron job.
 
 
 
 
 
 
 
 
 
33
 
34
+ An increase in the database volume can be expected because all statistic values are collected and managed in the local WordPress database (expecially if you increase the period of data saving).
35
 
36
+ ### JavaScript tracking for caching compatibility ###
37
+ For compatibility with caching plugins like [Cachify](http://cachify.de) *Statify* offers an optional switchable tracking via JavaScript. This function allows reliable count of cached blog pages.
 
38
 
39
  For this to work correctly, the active theme has to call `wp_footer()`, typically in a file named `footer.php`.
40
 
41
+ ### Skip tracking for spam referrers ###
42
  The comment blacklist can be enabled to skip tracking for views with a referrer URL listed in comment blacklist, i. e. which considered as spam.
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  ### Support ###
45
+ If you've problems or think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the [support forums](https://wordpress.org/support/plugin/statify).
 
46
 
47
  ### Contribute ###
48
  * Active development of this plugin is handled [on GitHub](https://github.com/pluginkollektiv/statify).
49
  * Pull requests for documented bugs are highly appreciated.
 
50
  * If you want to help us translate this plugin you can do so [on WordPress Translate](https://translate.wordpress.org/projects/wp-plugins/statify).
51
 
 
 
 
52
 
53
+ ## Frequently Asked Questions ##
54
 
55
+ ### What are the minimum requirements? ###
 
 
 
56
  * PHP 5.3 or greater
57
  * WordPress 3.9 or greater
58
 
 
 
 
59
  ### Which areas are excluded from counting? ###
60
  *Statify* does not count the following views:
61
 
72
  Some plugin users want to capture additional visitor data, e.g. name of the device and resolution.
73
  *Statify* counts exclusively page views and no visitors, the desired data acquisition is not a question.
74
 
75
+ ### How to change who can see the Dashboard widget? ###
76
+ Per default only administrators can see the widget. This can be changed with the `statify__user_can_see_stats` hook.
77
 
78
+ Example:
79
+ `
80
+ add_filter(
81
+ 'statify__user_can_see_stats',
82
+ '__return_true'
83
+ );
84
+ `
85
+
86
+ has to be added to the theme's `functions.php` and adapted to your needs. This example would allow all users to see the widget.
87
+
88
+ Editing the configuration is still limited to users with `edit_dashboard` capability.
89
+
90
+ ### How to skip tracking for defined users or pages ###
91
+ The conditions for tracking views can be customized according to page type and user capabilities by using the hook `statify__skip_tracking`.
92
 
93
+ Example:
94
+ `
95
+ add_filter(
96
+ 'statify__skip_tracking',
97
+ function() {
98
+ if ( condition ) {
99
+ return true;
100
+ }
101
+
102
+ return false;
103
+ }
104
+ );
105
+ `
106
+
107
+ has to be added to the theme's `functions.php`. The condition has modified such that the method returns true if and only if the view should be ignored.
108
+
109
+ ### How to extend this plugin? ###
110
+
111
+ * [Statify - Extended Evaluation](https://wordpress.org/plugins/extended-evaluation-for-statify/) for a more detailed evaluation and export function
112
+ * [Statify Widget](https://wordpress.org/plugins/statify-widget/) to display most popular content
113
+ * [Statify Blacklist](https://wordpress.org/plugins/statify-blacklist/) to define a customized blacklist for referrer spam
114
+
115
+
116
+ ## Changelog ##
117
  You can find the full changelog in [our GitHub repository](https://github.com/pluginkollektiv/statify/blob/master/CHANGELOG.md).
118
 
119
+ ### 1.5.1 (2017-05-04) ###
120
+ * Bugfix: Consider filter for skipping tracking correctly if JavaScript tracking is disabled.
121
+ * Bugfix: PHP Notice for empty blacklist value.
122
+
123
  ### 1.5.0 (2017-03-23) ###
124
  * Switched to minimal PHP version 5.3
125
  * Added more flexible settings for period of data saving and the number of entries shown in top lists
158
  For the complete changelog, check out our [GitHub repository](https://github.com/pluginkollektiv/statify).
159
 
160
 
161
+ ## Upgrade Notice ##
162
+
163
+ ### 1.5.1 ###
164
+ Bugfix release. It is recommended for all users.
165
+
166
+
167
  ## Screenshots ##
168
  1. Statify dashboard widget
169
  2. Statify dashboard widget options
statify.php CHANGED
@@ -3,12 +3,11 @@
3
  * Plugin Name: Statify
4
  * Description: Compact, easy-to-use and privacy-compliant stats plugin for WordPress.
5
  * Text Domain: statify
6
- * Domain Path: /lang
7
  * Author: pluginkollektiv
8
  * Author URI: http://pluginkollektiv.org
9
- * Plugin URI: https://wordpress.org/plugins/statify
10
  * License: GPLv3 or later
11
- * Version: 1.5.0
12
  *
13
  * Copyright (C) 2011-2017 Sergej Müller, pluginkollektiv
14
  *
3
  * Plugin Name: Statify
4
  * Description: Compact, easy-to-use and privacy-compliant stats plugin for WordPress.
5
  * Text Domain: statify
 
6
  * Author: pluginkollektiv
7
  * Author URI: http://pluginkollektiv.org
8
+ * Plugin URI: https://wordpress.org/plugins/statify/
9
  * License: GPLv3 or later
10
+ * Version: 1.5.1
11
  *
12
  * Copyright (C) 2011-2017 Sergej Müller, pluginkollektiv
13
  *