Webxperthub Post Views & Reading Time

Webxperthub Post Views & Reading Time

Details
View on WordPress

Webxperthub Post Views & Reading Time is a lightweight WordPress plugin that automatically tracks how many times each post is viewed and measures the total reading time accumulated from all visitors. Perfect for bloggers, content creators, and site owners who want to understand their audience engagement at a glance.

Key Features:

  • View Tracking – Automatically count the number of unique sessions viewing each post with intelligent bounce filtering
  • Reading Time Analytics – Measure actual time visitors spend reading your posts
  • Admin Dashboard Widget – Beautiful analytics widget showing total views, posts, and cumulative reading time
  • Post List Columns – Display views and reading time directly in the post list for quick reference
  • Smart User Filtering – Automatically excludes administrators, editors, authors, and contributors from view counts to track real visitor engagement
  • Session-based Counting – Prevents artificially inflating counts by tracking views per session, not per page load
  • Security First – Built with WordPress security standards including nonce verification, input sanitization, and proper output escaping
  • Lightweight & Efficient – Minimal database footprint with optimized AJAX requests and prepared statements
  • Zero Configuration – Works automatically after activation, no settings to configure
  • Responsive Design – Dashboard widget looks great on all screen sizes

How It Works

View Tracking Process:
1. When a visitor loads a post, JavaScript waits 2 seconds (bounce filter) before sending a tracking request
2. An AJAX request is sent to your WordPress backend
3. The view count for that post is incremented in the post meta
4. SessionStorage records that this post was counted in the current session to prevent duplicates

Reading Time Tracking Process:
1. JavaScript monitors how long a visitor spends on the page
2. Timing begins after the initial 2-second bounce delay
3. Timing ends when the visitor leaves the page or switches browser tabs
4. Only intervals of 3+ seconds are counted (minimum threshold)
5. A maximum of 30-minute intervals are recorded (filters outliers like tabs left open)
6. The accumulated time is added to the post’s total reading time meta

Dashboard Widget:
The admin dashboard displays:
– Total number of published posts
– Sum of all views across all posts
– Cumulative reading time from all visitors (formatted as “X hours Y minutes”)

Post List Columns:
Two new columns in the Posts list show:
– Views: Total view count for each post
– Read Time: Total accumulated reading time (click column header to sort)

Technical Details

Database:
_webxperthub_pvrt_view_count — Stores the total view count for each post
_webxperthub_pvrt_reading_time — Stores total reading time in seconds for each post
– Uses standard WordPress post meta (no custom tables)

Security:
– All AJAX endpoints verify nonces for CSRF protection
– User input is sanitized and validated before use
– Output is properly escaped for display
– User roles are verified to exclude staff accounts
– Only published posts are tracked

Performance:
– Efficient prepared statements for all database queries
– Asynchronous AJAX requests do not block user interaction
– SessionStorage prevents redundant database calls
– Minimal CSS and JavaScript payload
– No external API calls or third-party services

Support

For support, feature requests, or bug reports, please visit the plugin’s WordPress.org support forum. When posting, please include:

  1. A clear description of your issue
  2. Your WordPress version and PHP version
  3. A list of your currently active plugins
  4. Any error messages from your browser console (press F12)

Credits

Developed by Iftiar Hossain — Webxperthub

License

This plugin is licensed under the GPL-2.0-or-later license. You are free to use, modify, and distribute this plugin under the terms of the GNU General Public License.

For more information about the GPL, visit: https://www.gnu.org/licenses/gpl-2.0.html

Details

Plugin code:
webxperthub-post-views-reading-time
Plugin version:
1.0.0
Outdated:
No
WP version:
5.0 or higher
PHP version:
7.4 or higher
Test up to WP version:
7.0
Total installations:
0
Last updated:
2026-05-24
Rating:
Times rated:
0
analytics
engagement
post-views
reading-time
tracking