WP Manifestindependent plugin directory
manifest / content / wordpress-smart-reading-progress

Smart Reading Progress

A lightweight WordPress plugin featuring a customizable reading progress bar, admin settings, REST API integration, and responsive frontend functionality using PHP, JavaScript, and CSS. Copy

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ajchoudhary764-tech/wordpress-smart-reading-progress/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Smart Reading Progress (WordPress Plugin)

An accessible, lightweight reading-progress bar for WordPress posts and other public content types.

Features

  • Settings under Settings → Reading Progress (enable/disable, color, bar height and content types).
  • Escaped admin HTML, sanitized options and capability-gated settings.
  • CSS transform animation updated using requestAnimationFrame; passive scroll listener.
  • ARIA progressbar attributes for assistive technologies.
  • Admin-only REST endpoint: GET /wp-json/srp/v1/settings.
  • No external JavaScript libraries or tracking.

Requirements

  • WordPress 6.2+
  • PHP 7.4+

Installation

  1. Download the repository ZIP and extract it.
  2. Copy wp-smart-reading-progress into wp-content/plugins/ or zip the plugin folder and upload via Plugins → Add New → Upload Plugin.
  3. Activate Smart Reading Progress.
  4. Customize it at Settings → Reading Progress.
  5. Open a single post and scroll to see the bar.

REST endpoint security

GET /wp-json/srp/v1/settings requires an authenticated user with manage_options. For requests from WordPress admin JavaScript, send the X-WP-Nonce header. Anonymous users receive HTTP 401 (or 403 when logged in without permission).

Manual QA checklist

  • [ ] Enable/disable changes visibility on single posts.
  • [ ] Selecting pages or custom public post types changes where the bar appears.
  • [ ] Color and height settings update on front end.
  • [ ] On a short page, reading progress resolves to 100%.
  • [ ] At top, middle and bottom of long page progress is approximately 0%, 50% and 100%.
  • [ ] The REST endpoint rejects anonymous and non-admin requests.
  • [ ] Invalid color and out-of-range heights are sanitized.
  • [ ] No bar shows in the WordPress admin or print view.

Development notes

No build tooling required. The project uses WordPress settings and REST APIs. Test in a local WordPress environment before production use.

License

GPL-2.0-or-later