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 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)
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
For support, feature requests, or bug reports, please visit the plugin’s WordPress.org support forum. When posting, please include:
Developed by Iftiar Hossain — Webxperthub
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