Title: Site Stats Dashboard
Author: szatek
Published: <strong>5 marca, 2025</strong>
Last modified: 6 marca, 2025

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/site-stats-dashboard.svg)

# Site Stats Dashboard

 By [szatek](https://profiles.wordpress.org/szatek/)

[Download](https://downloads.wordpress.org/plugin/site-stats-dashboard.1.0.zip)

 * [Details](https://sl.wordpress.org/plugins/site-stats-dashboard/#description)
 * [Reviews](https://sl.wordpress.org/plugins/site-stats-dashboard/#reviews)
 *  [Installation](https://sl.wordpress.org/plugins/site-stats-dashboard/#installation)
 * [Development](https://sl.wordpress.org/plugins/site-stats-dashboard/#developers)

 [Support](https://wordpress.org/support/plugin/site-stats-dashboard/)

## Description

Site Stats Dashboard is a simple WordPress plugin that displays your website’s statistics
in the admin panel. It shows:

 * The number of published posts.
 * The number of approved comments.
 * The total visit count (each front-end page load is counted).

The plugin uses the WordPress REST API to provide the statistics and renders the
admin dashboard using React via the `wp.element` package.

### Features

 * **Admin Dashboard:** A dedicated admin page accessible from the WordPress dashboard
   under the “Site Stats” menu.
 * **Live Statistics:** Displays post count, comment count, and visit count.
 * **REST API Integration:** Provides a custom REST API endpoint (`ssds/v1/stats`)
   that returns the site statistics.
 * **React-Based UI:** Uses React (via the built-in `wp.element` library) for the
   admin dashboard interface.
 * **Visit Tracking:** Tracks every front-end page load to increment the visit counter.

### Usage

 * **Admin Panel:** Once activated, click on the “Site Stats” menu item in the WordPress
   admin sidebar to see the statistics.
 * **REST API:**
    The plugin registers a REST API endpoint at: http://your-site-
   url/wp-json/ssds/v1/stats

This endpoint returns a JSON response with the keys `post_count`, `comment_count`,
and `visit_count`.

**Note:** Access to the REST API endpoint is restricted to users with the `manage_options`
capability (typically administrators).

 * **Visit Tracking:**
    Every time a front-end page is loaded (excluding admin pages
   and AJAX requests), the plugin increments the visit counter. This means the visit
   count increases on every page load, not only for unique visitors.

### License

This plugin is licensed under the [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html).

### Additional Notes

 * The admin dashboard interface is built using React without a build process (JSX
   is not used). If you later decide to use JSX or more advanced React features,
   you’ll need to integrate a build system (e.g., webpack with Babel).
 * Ensure you are logged in as an administrator (or a user with the `manage_options`
   capability) when accessing the plugin dashboard or the REST API endpoint.

## Installation

 1. **Download and Upload:**
 2.  * Download the plugin files and unzip the archive.
     * Upload the entire `site-stats-dashboard` folder to the `/wp-content/plugins/`
       directory on your WordPress site.
 3. **Activate the Plugin:**
 4.  * Go to the **Plugins** page in your WordPress admin panel.
     * Find **Site Stats Dashboard** in the list and click **Activate**.
 5. **Access the Dashboard:**
 6.  * In the admin panel, navigate to **Site Stats** (located in the left-hand menu)
       to view the statistics dashboard.

## FAQ

### Does the plugin track unique visitors?

No, the current implementation simply increments the counter on each page load. 
It does not differentiate between unique and repeat visitors.

### What statistics does the plugin display?

It displays:
 – The total number of published posts (only the default “post” post
type). – The total number of approved comments. – The total number of page visits(
incremented on every front-end load).

### Can I extend this plugin?

Yes, the plugin is designed as a starting point. You can modify or extend it to 
track additional statistics or refine the visit tracking logic (e.g., counting only
unique visitors).

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Site Stats Dashboard” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ szatek ](https://profiles.wordpress.org/szatek/)

[Translate “Site Stats Dashboard” into your language.](https://translate.wordpress.org/projects/wp-plugins/site-stats-dashboard)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/site-stats-dashboard/),
check out the [SVN repository](https://plugins.svn.wordpress.org/site-stats-dashboard/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/site-stats-dashboard/)
by [RSS](https://plugins.trac.wordpress.org/log/site-stats-dashboard/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

### 1.0

 * Initial release:
 * Admin page to display site statistics.
 * REST API endpoint for fetching stats.
 * React-based admin interface.
 * Front-end visit tracking.

## Meta

 *  Version **1.0**
 *  Last updated **1 leto ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.2 or higher **
 *  Tested up to **6.7.5**
 *  PHP version ** 7.2 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/site-stats-dashboard/)
 * Tags
 * [comments](https://sl.wordpress.org/plugins/tags/comments/)[dashboard](https://sl.wordpress.org/plugins/tags/dashboard/)
   [posts](https://sl.wordpress.org/plugins/tags/posts/)[stats](https://sl.wordpress.org/plugins/tags/stats/)
   [visits](https://sl.wordpress.org/plugins/tags/visits/)
 *  [Advanced View](https://sl.wordpress.org/plugins/site-stats-dashboard/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/site-stats-dashboard/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/site-stats-dashboard/reviews/)

## Contributors

 *   [ szatek ](https://profiles.wordpress.org/szatek/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/site-stats-dashboard/)