Halloween Sale 15% off Ends in See the plans

Snippet Library

WordPress code snippets, ready to use

3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.

1–16 of 16 snippets “statistics”

  • PHP Dashboard

    Author Leaderboard Widget

    Adds a dashboard widget ranking authors by the number of posts they published this month, with last month's figure for comparison, to celebrate your most active writers.

  • PHP Dashboard

    Last 7 Days Compared Widget

    Adds a dashboard widget comparing new posts, comments and user registrations from the last seven days with the seven days before, with up and down arrows.

  • PHP Dashboard

    Media Library Overview Widget

    Adds a dashboard widget breaking the Media Library down into images, videos, audio and documents, with uploads this month and the number of files not attached to any content.

  • PHP Users

    Member Count Shortcode

    Adds a [wpide_member_count] shortcode that shows how many members your site has, optionally for one role, cached so it stays fast on big sites.

  • PHP Developer

    Private Site Statistics REST Endpoint

    Adds a /wp-json/site/v1/stats endpoint that returns post, page, comment and user counts to logged-in editors or application-password clients, for reporting tools and status boards.

  • PHP Frontend & Design

    Progress Bar Shortcode

    Adds a [wpide_progress value="75" label="Funding goal"] shortcode that draws a labeled progress bar, for fundraising goals, skills or project status.

  • PHP Content

    Simple Post Views Counter

    Counts how many times each blog post is viewed, shows the total in a Views column in the posts list and adds a [post_views] shortcode for the front end.

  • PHP Dashboard

    Your Writing Stats Widget

    Adds a personal dashboard widget showing how many posts and words you published this month and this year, plus your current number of drafts, a small motivation boost for writers.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.