WordPress & WooCommerce Statistics Dashboard
Advanced cached WordPress and WooCommerce statistics dashboard for revenue, orders, customers, coupons, products, content, system health, and HPOS reporting.
by Amirreza Shayesteh Far · github.com/amirrezashf/wordpress-woocommerce-statistics-dashboard · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/amirrezashf/wordpress-woocommerce-statistics-dashboard/archive/refs/heads/main.zipReadme
WordPress & WooCommerce Statistics Dashboard
A cached admin dashboard for WordPress and WooCommerce operational statistics.
Features
- Date ranges: today, yesterday, current/previous week, current month, last 30 days, current quarter, and custom ranges
- Current-period vs previous-period comparisons
- Paid orders, gross revenue, refund amount, net revenue, average/min/max order value
- Revenue and order charts
- Order status distribution
- Customer counts, repeat customers, lifetime-value estimate, and repeat-purchase interval
- Payment gateway performance
- Coupon usage and discount metrics
- Top products and product-category revenue
- Stock overview
- Review and WordPress content statistics
- User-registration chart
- PHP, WordPress, WooCommerce, database, cron, cache, extensions, and Action Scheduler health information
- One-hour transient cache with explicit refresh
- HPOS and legacy order-storage support
Requirements
- WordPress 6.0+
- PHP 7.4+
- WooCommerce is optional for WordPress/system metrics; WooCommerce metrics appear when WooCommerce is active.
Installation
- Upload
WordPress-WooCommerce-Statistics-Dashboardto/wp-content/plugins/. - Activate WordPress & WooCommerce Statistics Dashboard.
- Open Statistics Dashboard in WordPress admin.
HPOS
When WooCommerce is active, the plugin uses WooCommerce's OrderUtil::custom_orders_table_usage_is_enabled() to determine the active order storage. Raw reporting SQL is then routed to the active storage model.
For HPOS queries, local WordPress date ranges are converted to UTC before comparison with date_created_gmt.
Cache
Dashboard payloads are cached for up to one hour.
Instead of deleting transient rows with a broad SQL LIKE, cache invalidation increments a cache-generation value. Old transient entries expire naturally.
Cache is invalidated when an order is created, an order status changes, a user registers, or the administrator uses the refresh control.
Metric Notes
Paid-order queries use WooCommerce's current paid statuses when available.
Category revenue can overlap when the same product belongs to multiple product categories, because each category receives the associated line-item amount. Therefore the sum of category revenue is not guaranteed to equal total store revenue.
Performance
The dashboard intentionally uses aggregate SQL instead of instantiating large numbers of WC_Order objects. Results are cached to reduce repeated reporting queries. Large stores should benchmark the dashboard against production-sized data before frequent use.
Security
- Access uses
manage_woocommercewhen WooCommerce is active andmanage_optionsotherwise. - Manual refresh uses authenticated AJAX with a nonce and capability check.
- Custom date input is validated.
- Dynamic output is escaped where applicable.
Data Storage
No custom tables are created.
- WordPress transients: cached dashboard payloads
wcsd_cache_generation: cache invalidation generation
License
GPL-3.0
Author
Amirreza Shayesteh Far
https://github.com/amirrezashf
داشبورد آمار وردپرس و ووکامرس
افزونهای برای نمایش آمار مدیریتی WordPress و WooCommerce با Cache و پشتیبانی از HPOS.
قابلیتها
- بازههای زمانی آماده و بازه دلخواه
- مقایسه دوره جاری با دوره قبل
- درآمد، سفارش، استرداد و میانگین سفارش
- نمودار درآمد و تعداد سفارش
- وضعیت سفارشها
- تحلیل مشتریان و خرید تکراری
- درگاههای پرداخت و کدهای تخفیف
- محصولات پرفروش و درآمد دستهها
- وضعیت موجودی
- دیدگاهها، محتوا و ثبتنام کاربران
- سلامت PHP، WordPress، WooCommerce، Database، Cron و Action Scheduler
- Cache یکساعته
- پشتیبانی از HPOS و Legacy storage
HPOS
وضعیت واقعی HPOS با API رسمی WooCommerce بررسی میشود؛ صرف وجود جدول wc_orders بهمعنی فعال بودن HPOS در نظر گرفته نمیشود.
در Queryهای HPOS، بازه زمانی محلی WordPress قبل از مقایسه با date_created_gmt به UTC تبدیل میشود.
Cache
برای پاکسازی Cache دیگر DELETE گسترده روی جدول options اجرا نمیشود. افزونه از Cache Generation استفاده میکند و Transientهای قبلی بهصورت طبیعی منقضی میشوند.
نکته آماری
اگر یک محصول عضو چند دسته باشد، گزارش درآمد دستهها میتواند همان Line Item را در چند دسته نمایش دهد؛ بنابراین جمع درآمد دستهها الزاماً برابر درآمد کل فروشگاه نیست.
امنیت
دسترسی داشبورد با Capability مدیریتی محدود است و Refresh دستی نیز Capability و Nonce را بررسی میکند.
مجوز
GPL-3.0
نویسنده
Amirreza Shayesteh Far
https://github.com/amirrezashf