Giter Club home page Giter Club logo

wp-statistics's Introduction

Average time to resolve an issue Percentage of issues still open

WP Statistics

A free and advanced statistics plugin for WordPress

A comprehensive plugin for your WordPress visitor statistics, come visit us at our website for all the latest news and information.

Track statistics for your WordPress site without depending on external services and uses arrogate data whenever possible to respect your users privacy.

On screen statistics presented as graphs are easily viewed through the WordPress admin interface.

This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.

Features

  • Online users, visits, visitors and page statistics
  • Search Engines, see search queries and redirects from popular search engines like Google, Bing, DuckDuckGo, Yahoo, Yandex and Baidu
  • Overview and detail pages for all kinds of data, including; browser versions, country stats, hits, exclusions, referrers, searches, search words and visitors
  • GeoIP location by Country
  • Support for hashing IP addresses in the database to protect your users privacy
  • Interactive map of visitors location
  • E-mail reports of statistics
  • Set access level for view and manage roles based on WordPress roles
  • 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
  • Record statistics on exclusions
  • Automatic updates to the GeoIP database
  • Automatically prune the databases of old data
  • Export the data to XML, CSV or TSV files
  • Widget to provide information to your users
  • Shortcodes for many types of data in both widgets and posts/pages
  • Dashboard widgets for the admin area
  • Comprehensive Admin Manual

Internationalization

WP Statistics has been translated in to many languages, for the current list and contributors, please visit the translate page.

Translations are done by people just like you, help make WP Statistics available to more people around the world and do a translation today!

Installation

  1. Upload wp-statistics to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Make sure the Date and Time is set correctly in WordPress.
  4. Go to the plugin settings page and configure as required (note this will also download the GeoIP database for the fist time).

Function API

WP Statistics supports several functions for other plug-in and theme authors to use to retrieve statistics about the site. All of the external functions available in this link.

Shortcodes

WP Statistics supports shortcodes in WordPress, these can be used in either a post and page body as well as an HTML widget. Description of shortcode available in this link

Development

Namespaces

There are two namespaces WP_STATISTICS and WP_Statistics that the new classes which is in the new structure is in the /src folder and support PSR-4, so the new classes should be implemented in the new namespace.

Community Links

Donate

Would you like to support this project?

  • Paypal Paypal: Donate
  • btc Bitcoin: bc1qjezs7vusvvmhxrhxan7nkl7kvnpy624wxhse2p

Build the assets

Requirement: Before any build it`s necessary to fix these below versions then use npm and gulp commands

  • npm v6.*
  • node v14.*

You need to install the gulp in advance.

npm install --global gulp
npm install --global gulp-cli

Then install dependencies and tasks

npm install
gulp

wp-statistics's People

Contributors

abrain avatar abrzzzz avatar adlerweb avatar alifallahrn avatar amirfallahii avatar csftools avatar farhadsakhaei avatar foadadeli avatar fscherwi avatar hanie98 avatar hanieveysian avatar ighorbani avatar javadyousefi avatar kipmyk avatar mehrshaddarzi avatar mhitman avatar mostafasoufi avatar mrmolaei avatar nimaprmdi avatar pedro-mendonca avatar rezathriii avatar robsdedude avatar rubengameztorrijos avatar speakerbug avatar sui-drmz avatar toolstack avatar unix1 avatar vicocotea avatar vtamm avatar yalda-sharafi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-statistics's Issues

unrealistic data issues

extreme differences with google analytics. I might understand a few missed users, but g-analytics gives me 37 for yesterday, while wp-stats gives 158 users. Page views for g-analytics 52 ,and for wp-stats 429. please help - https://pornhy.com

Log stats using Ajax

When I use wp-super-cache and enable html cache, wp-statistics won't count again.
Can it support a ajax way to statistics?

Vaultpress reporting a PHP.Generic.BadPattern.5 error in guzzleHttp

Describe the bug
PHP.Generic.BadPattern.5
This code pattern is often used to run a very dangerous shell programs on your server. The code in these files needs to be reviewed, and possibly cleaned.

file: Middleware.php

232
return function ($request, array $options) use ($handler, $fn) {
233
return $handler($fn($request), $options);
234
};

the hightlighted code was flagged by VaultPress and a security threat by allowing potential remote shell execution.

broken hyperlink of external links (a missed ":")

Hi,
I just wanted to inform you about an annoying bug in your awesome wp-statistics add-on which has not fixed in your recent updates. It seems you have missed a ":" in hyperlinks of (last visitors) and (last searched keywords) which makes the hyperlink unreadable for the web browser (something like "https//www.google.com"). Please see the attached image. I'm not sure if this bug is on other parts of your code too or not.

Kind regards,
Saeed

statistics-bug

Add bar chart as an alternative to line chart for all statistics

This is a really wonderful plugin, except for the fact that it uses an interpolated line chart to show discretized statistics.

From a visualization standpoint, this makes no sense. We are looking at discretized (daily, weekly, monthly) data, drawing smooth curves from point to point adds no value whatsoever.

Please consider adding a bar chart option to view all time-based stats.

For hits use a grouped bar chart (visits, hits) and for search engine referrals use a stacked bar chart.

To re-iterate: Line charts are not the right chart type for this type of data, bar charts are.

(If you made this a paid add-on, I would buy it in a flash, and my eyes would be grateful.)

Missing Panel toggle indicators

The stats panels are collapsable but the indicator arrow is missing.

The WordPress core dashboard panels have the following code pattern:

<button type="button" class="handlediv" aria-expanded="true">
    <span class="screen-reader-text">Toggle panel: Summary</span>
    <span class="toggle-indicator" aria-hidden="true"></span>
</button>
<h2 class='hndle'><span>Summary</span></h2>

Instead, the plugin have only:

<div class="handlediv" title="Click to toggle"><br/></div>
<h3 class="hndle"><span>Browsers</span></h3>

Suggested code pattern:

<button class="handlediv" type="button" title="<?php printf( __( 'Toggle panel: %s', 'wp_statistics' ), __( 'Hits Statistics Chart', 'wp_statistics' ) ); ?>">
    <span class="screen-reader-text"><?php printf( __( 'Toggle panel: %s', 'wp_statistics' ), __( 'Hits Statistics Chart', 'wp_statistics' ) ); ?></span>
    <span class="toggle-indicator" aria-hidden="true"></span>
</button>
<h2 class="hndle"><span><?php _e( 'Hits Statistics Chart', 'wp_statistics' ); ?></span></h2>

These changes are according to WP core and add the following:

  • screen reader text
  • toggle indicator arrow
  • key navigation
  • UI and Translation strings consistent with core

Duplicate entry in log_error file

Duplicate entry '2018-02-24-/mysiteurl/?gclid=E' for key 'date_2' INSERT INTO wp_statistics_pages (uri, date, count, id) VALUES ('/mysiteurl/?gclid=EAIaIQpbChMIj8v_lqW-2QIVjpztCh0-0QhVEAEYASAAEgJdz_D_BwE', '2018-02-24', 1, '14') Comming from require('wp-blog-header.php'), wp, WP->main, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, WP_Statistics_Frontend::init, WP_Statistics_Hits->Pages

i used google adwords sign for url attribute.

vault press is reporting potential security threats in guzzle help

Describe the bug

Vaultpress is reporting a potential security threat in guzzlehttp plugin.

Generic.Hidden.Code.2
This file contains suspicious hidden code, and should be checked for recent changes, or malicious code. Often hackers try to hide their hack attempts by obfuscating their attack code, to make it harder to detect. VaultPress has detected a string of suspicious characters in this file. Please check your backup history for recent changes to this file, or contact a Safekeeper if you are unsure.

file: SetCookie.php

if (preg_match(
380
'/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
381
$name)

the scanner is flagging the highlighted text as a potential security threat

IPv6 detect issue?

Hi, I've set up wp statistics 12.3.1 on latest wp, but it shows "PHP IPv6 Enabled: No", and my client IP turns 127.0.0.1.
I'm sure my IPv6 support is enable in my PHP 7.0.25, you can check here to find my configurations.
What's wrong with it? Or what can I do to fix it?

Syntax error on php-5.3 server

Wordpress installation on CentOS 6.9 is failing to start after plugin updates.

[Wed Aug 30 22:19:14 2017] [error] [client 202.46.54.24] PHP Parse error: syntax error, unexpected '[' in /var/www/html/wp/wp-content/plugins/wp-statistics/wp-statistics.php on line 707

The issue is that on that line there is statement:

$plugins = [];

which is fine on PHP 5.4 and after, but CentOS 6 has PHP 5.3.
Working syntax is:

$plugins = array();

Please keep the trailing edge alive too.

Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips

Update browscap functions

Should be improved.

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 88 bytes) in /home/wp-content/plugins/wp-statistics/includes/vendor/browscap/browscap-php/src/phpbrowscap/Browscap.php on line 1007

CC @dedi-data

Plugin conflict: Visual Composer and WP Statistics

When using Visual Composer's frontend is basically not usable when WP Statistics plugin is active. The issue is the same with any colorpicker field - it might be in some other places as well - just color picker issue is the easiest to notice.
Issue disappeared when WP Statistics plugin was disabled.

I noticed this issue in version 12.3.6.1.

To Reproduce
Steps to reproduce the behavior:

  1. Install and activate Statistics
  2. Try to edit a page with Visual Composer
  3. Add any element on the page
  4. While editing that element go to Design options tab
  5. See colorpicker state (attached)
  6. Also cannot save any change.
  7. Following error found in the console log:
Uncaught TypeError: (intermediate value).setHSpace is not a function
    at a.(/wp-admin/anonymous function).(anonymous function)._create (http://test.local/wp-admin/js/iris.min.js?ver=1.0.7:4:7910)
    at a.(/wp-admin/anonymous function).(anonymous function)._create (http://test.local/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load%5B%5D=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:21:1032)
    at a.(/wp-admin/anonymous function).(anonymous function).a (http://test.local/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load%5B%5D=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:21:857)
    at a.(/wp-admin/anonymous function).(anonymous function)._create (http://test.local/wp-content/themes/publisher/includes/libs/better-framework/assets/js/admin-plugins.js?ver=3.5.1:108:4143)
    at a.(/wp-admin/anonymous function).(anonymous function)._create (http://test.local/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load%5B%5D=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:21:1032)
    at a.(/wp-admin/anonymous function).(anonymous function)._createWidget (http://test.local/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load%5B%5D=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:21:3093)
    at new a.(/wp-admin/anonymous function).(anonymous function) (http://test.local/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load%5B%5D=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:21:593)
    at HTMLInputElement.<anonymous> (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load[]=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:21)
    at Function.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load[]=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:2)
    at a.fn.init.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,backbone,wp-util,moxiejs,plupload,jquery-ui-core&load[]=,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.6:2)

Screenshots
image

Desktop (please complete the following information):

  • OS: Win 10
  • Browser: Chrome (v66.0.3359.181), Firefox (v52.5.0 (ESR - 64-bit))

pagination.class.php

The file /includes/classes/pagination.class.php didn't use in codes,
Should we remove that?
Or it includes somehow else?

Opt-Out does not disable tracking / has no effect if IP-hashing is active

At the moment we've got a way to allow users to "opt-out" (398), according to the standard Text this is supposed to affect "any future tracking".

As far as I can see the Cookie however only hashes the users IP but doesn't prevent any other information to be recorded - right? So the plugin is still tracking the user, just not recording the unhashed IP (which results in no change if hashing is enabled globally). Shouldn't at least things like Referrer, User-Agent, etc also be stripped if a no-track-cookie is present?

BUG: datepicker problem with customized wordpress date format

Current situation:
Datepicker default date format is "m/d/Y", the last day of the last year would be displayed: 12/31/2017
here is a example with of last year displayed correct:
datepicker_manuallpick

The problem:
We are using this custom date format "F j, Y", the last day of the last year would be displayed; Dezember 31, 2018
As soon as the date is picked with the datepicker calender, the default format will be overriden with our custom format and looks like in this screenshot:
grafik

When I send the request for the "wrong" date above this response will appear.
datepicker_calenderpick

Looks like the the parameter will be transformed to our (german) format and can't be processed.

I hope my explantation can help,

no GDPR compliant IP storage

The current IP anonymization feature is not really secure or anonymous.

sha1 is already broken / insecure and not recommended at all.

To be GDPR compliant IPs have to be shortened (last bytes are zeroed, IPv4 and IPv6).

'ip' => '#hash#' . sha1( $row->ip . $randomString ),

return '#hash#' . sha1( $this->ip . $_SERVER['HTTP_USER_AGENT'] );

Documentation of measures for privacy protection

I know that wp-statistics aims at being a very privacy oriented analytics tool and I suppose this is a big selling point for most of its users. It would therefore be great if issues related to privacy were better documented. I couldn't find any page in the documentation that summarizes precisely which data is up-/downloaded by the plugin to/from which services and whether any settings (apart from the hashing of ip addresses) have any privacy implications.

From skim reading the code and the discussions on the forum, I get the impression that wp-statistics does a great job in terms of privacy. Then why not brag about it on a documentation page? :-)

As an example: I asked myself (and still do not understand this fully) what the consequences of activating or disabling search engines in the settings are and why one is not allowed to disable all search engines. If this setting really just controls which search engines are displayed in the chart, then why is one not allowed to disabled all of them? Also it would be interesting to have information on where and how the plugin stores information, in which format and how this can be accessed by other plugins in a central place. Please consider explaining such things better. Thank you!

Mystic number under Opt-Out-DIV

When I get the opt-out-message printed on my website, there is also printed a mystic number under that DIV element. The number seems to be something like an ID because it does only change depending on the requested url. See my screenshot from html code:

bildschirmfoto 2018-07-30 um 16 29 24

After the message was confirmed or denied, the number disappeared. Where does it come from or is this a bug? My research in the source code was not successful.

Opt-out bar is not shown

Describe the bug
The "opt-out" banner is not displayed (in fact it is not even included in the html code). Neither on the mobile, nor on the desktop version. I am experiencing this problem with the OnePress theme but there are several other users reporting the same in the forum:
https://wordpress.org/support/topic/opt-out-message-not-displayed/
https://wordpress.org/support/topic/how-to-use-opt-out/
https://wordpress.org/support/topic/opt-out-dont-work/
https://wordpress.org/support/topic/wp-statistics-opt-out-not-working-on-mobile-devices/

To Reproduce
Steps to reproduce the behavior:

  1. Install the plugin.
  2. Activate the opt-out option in settings.
  3. Observe that no opt-out bar is shown.

Expected behavior
The bar at the bottom of the screen is shown and user can opt-out of tracking.

Desktop (please complete the following information):

  • OS: irrelevant as the html code is not even generated
  • Browser: irrelevant as the html code is not even generated
  • Version: 12.3.6.1 (the problem was introduced with this version as far as I can tell)

Smartphone (please complete the following information):

  • Device: irrelevant as the html code is not even generated
  • OS: irrelevant as the html code is not even generated
  • Browser irrelevant as the html code is not even generated
  • Version: 12.3.6.1 (the problem was introduced with this version as far as I can tell)

Additional context

  • This is a critical issue as it can have legal repercussions for your users.
  • In addition the opt-out should be an actual opt-out: #125

no Opt-out on internet explorer

Describe the bug
The confirmation message for the Opt-out is not shown on internet explorer.
I've looked into the source code of the page and I cannot see 'div class="wp-statistics-opt-out"' at all.

To Reproduce

  1. Activate Opt-out
  2. Use Internet Explorer

Expected behavior
Seeing the Opt-out message.

Desktop:

  • OS: Windows 10
  • Browser Internet Explorer 11.165.17134.0
  • Version 12.3.6.4

Additional context
This is serious because I'm pretty sure the GDPR law still applies even when you visit a website with Internet Explorer.

opt-out url naming

If I read your code correctly, %accept_url% will let the user opt-out of the tracking.
However, first time I read the default text

This website stores some user agent data. These data are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to opt-out of any future tracking, a cookie will be set up in your browser to remember this choice for one year. <a href="%accept_url%">I Agree</a>, <a href="%cancel_url%">Deny</a>

I assumed that agree would refer to being tracked. Especially since this is the way these "we will track you with cookies" overlays worked on the vast majority of pages before. Thus, I would either clarify (in front- and backend) which link does what and/or swap the meaning.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.