WhoKnew Views™ | Reducing Server Load

Skip to main content
Table of Contents
Print

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

FeatureWhat It ReducesImpact
🤖 Bot FilterCrawler traffic from 50+ bots~30-50% reduction
⏱️ Refresh CooldownSame-visitor repeat views~20-40% reduction
👤 Admin ExclusionInternal staff viewsVariable
🌐 IP WhitelistTesting/monitoring IPsVariable
📦 Batch AggregationBackground processing load50 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 TypeWhat’s CachedDuration
WordPress TransientsForecast data, cooldown states24 hours
Browser CookiesVisitor cooldown per productConfigurable
Object Cache (if available)Options, settingsAutomatic
Session Storage (JS)Preview CSS, UI stateSession

📈 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.

Share