How WhoKnew Views™ minimizes server resource usage with smart filtering and optimized tracking
WhoKnew Views™ is engineered to have minimal impact on your server resources. Through intelligent filtering, rate limiting, and background processing, the plugin handles high-traffic stores without slowing down your site.
🛡️ Traffic Filtering (Reduces Database Writes)
The plugin filters out non-human and duplicate traffic before any database operations occur:
🤖
BLOCKED
Bot Traffic
50+ bot patterns (Googlebot, Bingbot, crawlers, SEO tools) are blocked from tracking. No database write occurs.
👤
BLOCKED
Admin Views
Logged-in administrators are automatically excluded from view tracking. Your test visits don’t inflate counts.
🌐
BLOCKED
Whitelisted IPs
IPs you’ve whitelisted (staff, testing, etc.) are excluded from tracking entirely.
⏱️
BLOCKED
Cooldown Period
Same visitor viewing same product within cooldown window (30 min default) is skipped—no duplicate counting.
✅ Result: Only genuine, unique human visitors trigger database writes. On a typical store, this eliminates 60-80% of potential tracking requests.
⚡ Early Exit Pattern
The view tracking function uses an “early exit” pattern—checks are performed in order of cost (cheapest first), and the function returns immediately when any filter matches:
// Check 1: Is this a product page?
if (!is_product()) return;← Exit immediately
// Check 2: Is visitor an admin?
if (current_user_can(‘manage_options’)) return;
// Check 3: Is IP whitelisted?
if (wkv_is_ip_whitelisted()) return;
// Check 4: Is visitor a bot?
if (wkv_is_bot_traffic()) return;
// Check 5: Is visitor in cooldown?
if ($within_cooldown) return;
// ✅ All checks passed → Count this view
📊 Server Load Reduction Summary
| Feature | What It Reduces | Impact |
|---|---|---|
| 🤖 Bot Filter | Crawler traffic from 50+ bots | ~30-50% reduction |
| ⏱️ Refresh Cooldown | Same-visitor repeat views | ~20-40% reduction |
| 👤 Admin Exclusion | Internal staff views | Variable |
| 🌐 IP Whitelist | Testing/monitoring IPs | Variable |
| 📦 Batch Aggregation | Background processing load | 50 products/batch |
🔄 Background Processing
Heavy operations run in the background via WP-Cron, not during page loads:
📊
Daily Aggregation
Compressing old timestamps runs once daily in the background, never during visitor requests.
🔑
License Validation
Pro license checks run daily via cron, with local caching in between.
🧹
Data Cleanup
Expired transients and old data are purged during cron jobs, not page loads.
🔮 Prophet API Rate Limiting
For Pro users, the AI forecasting system has built-in rate limiting to prevent API overload:
100/min
Per-minute limit
2,000/hr
Per-hour limit
24hr
Forecast caching
💾 Caching Everywhere
Multiple caching layers minimize database queries:
| Cache Type | What’s Cached | Duration |
|---|---|---|
| WordPress Transients | Forecast data, cooldown states | 24 hours |
| Browser Cookies | Visitor cooldown per product | Configurable |
| Object Cache (if available) | Options, settings | Automatic |
| Session Storage (JS) | Preview CSS, UI state | Session |
📈 Scaling for High Traffic
WhoKnew Views™ scales efficiently with your store’s growth:
🏪
100 Products
~2 seconds cron time
🏬
1,000 Products
~20 seconds (batched)
🏢
10,000 Products
~3 minutes (batched)
💡 Pro Tip: For very large stores (10,000+ products), ensure your hosting provider supports long-running cron jobs (max_execution_time of 180+ seconds).
📋 Server Load Optimization Checklist
- ✅ Bot filter is enabled (default)
- ✅ Your admin IP is whitelisted
- ✅ Refresh cooldown is set (30 min+ recommended)
- ✅ WP-Cron is running (or use system cron)
- ✅ Object caching is enabled (optional but recommended)
With these defaults, WhoKnew Views™ has virtually zero impact on your store’s front-end performance while providing accurate, real-time view tracking.