Title: 3 errors on report pages
Last modified: June 9, 2017

---

# 3 errors on report pages

 *  Resolved [deltafactory](https://wordpress.org/support/users/deltafactory/)
 * (@deltafactory)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/3-errors-on-report-pages/)
 * Hello,
 * I am reporting multiple issues/errors in the plugin for your consideration/correction:
 * 1. Processing of the `$extrafields` parameter of `wp_statistics_date_range_selector()`
   uses esc_url() incorrectly. The function is intended to format complete URLs.
   In this context it is being used to sanitize URL parameters. `esc_attr()` or `
   add_query_arg()` might be the better choice here.
 * Also, you might find it useful to use `wp_parse_args()` to handle input of `$
   extrafields` since that allows both URL-style and array key/value input. Just
   a suggestion…
 * 2. The pagination logic on the Top Pages report is incorrect, showing the “last”
   item per page as the first entry of subsequent pages. For example, #10 is the
   last on page 1 and first on page 2.
 * I resolved this by removing the if/break at the end of the pagination loop and
   changing the if statement before the log-item output to:
 *  `if( $count > $start && $count <= $start + 10 ) {`
 * 3. When selecting a manual date range (only tested on Top Pages code), the Range
   start/end dates are modified so that they are 1 day earlier. I haven’t looked
   for the exact cause or resolution.

The topic ‘3 errors on report pages’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [deltafactory](https://wordpress.org/support/users/deltafactory/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/3-errors-on-report-pages/)
 * Status: resolved