=== Massoftind Asset Manager ===
Contributors: masssoftware, devmanishpathak, massoft, sandipbiswas123 
Tags: assets, performance, javascript, css, optimize
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Analyze and safely optimize frontend CSS and JavaScript assets. Detect duplicates, unused handles, manage async/defer/delay, and roll back changes.

== Description ==

Massoftind Asset Manager helps developers inspect every CSS and JavaScript asset loaded on the frontend, then optimize loading without breaking the site.

= Features =

* Asset scanner (admin bar + timed 15-minute scan sessions)
* Page reports with size, dependencies, duplicates, and unused handles
* Assets grouped by WordPress core, plugin, theme, must-use plugin, or external source
* Search assets by handle, source URL, plugin/theme name, or dependencies
* Select all, or select an entire plugin/theme group
* Bulk optimize: Disable, Enable (only on selected scope), Async, Defer, Delay
* Scopes: entire site, this page/post, all singles, post type, taxonomy archive, URL contains
* Current-rule badges on each asset (with link to manage rules)
* Dependency viewer and disable simulation
* History snapshots with one-click rollback
* REST API and WP-CLI for users with `manage_options`
* Debug mode and activity logs
* Optional full data cleanup on uninstall

= Safety first =

Before disabling an asset, the plugin can simulate the change, warn about dependents, and refuse to unload required dependencies at runtime. Core WordPress assets are protected by default. Every rule change can be rolled back.

= Privacy =

This plugin does **not** phone home. There is no telemetry, analytics, license check, or remote API call. Everything works offline.

= Requirements =

* WordPress 6.5 or higher
* PHP 8.1 or higher

== Installation ==

1. Upload the `massoftind-asset-manager` folder to `/wp-content/plugins/`, or install the zip via **Plugins → Add New → Upload Plugin**.
2. Activate **Massoftind Asset Manager** under **Plugins**.
3. Open **Asset Manager** in the admin menu.
4. Start a scan session, visit frontend pages, then review reports and create rules.

== Frequently Asked Questions ==

= Will this break my site? =

The optimizer skips protected core assets (when enabled) and will not dequeue a handle that still has queued dependents. Always simulate first and keep rollbacks available. Test on staging when possible.

= How do I scan a page? =

Use **Start 15-minute scan** on Overview, then browse the frontend, or click **Scan Assets** in the admin bar on any frontend page. **Stop scan mode** only appears while a session is active.

= What does “Enable” do? =

Enable keeps the asset on the selected scope (this page, post type, taxonomy, or URL match) and removes it everywhere else.

= What does “unused” mean? =

Handles that are registered with WordPress but not enqueued on that page. This is not a CSS selector coverage analysis.

= Does the plugin contact external servers? =

No. No remote requests, tracking, or license validation.

= Where is the REST API? =

Authenticated endpoints under `massoftind-am/v1` for users with `manage_options`.

= How do I delete plugin data? =

Enable **Delete all plugin data on uninstall** in Settings, then uninstall the plugin.

== Screenshots ==

1. Asset Manager dashboard with scan session controls and recent activity.
2. Asset scanning interface showing all detected CSS and JavaScript assets.
3. Detailed page asset inspector with dependencies and optimization actions.
4. Rules management for Disable, Enable, Async, Defer, and Delay strategies.
5. Rollback history and activity logs.
6. Plugin settings and optimization preferences.

== Changelog ==

= 1.0.2 =
* Added WordPress.org plugin assets (banner, icons, and screenshots).
* Improved Overview dashboard with a cleaner, more modern interface.
* Refined Scans, Reports, Optimize, History, and Settings screens for better usability.
* Enhanced visual consistency across all admin pages with improved spacing, typography, and cards.
* Updated plugin documentation and screenshots to reflect the latest interface.
* Minor UI refinements and code cleanup.

= 1.0.1 =
* Contributors: added WordPress.org usernames (including plugin owner) to readme.
* Admin notices now render only on Asset Manager screens (Guideline 11 — no dashboard hijacking).

= 1.0.0 =
* Initial public release of Massoftind Asset Manager (slug: massoftind-asset-manager).
* Added Overview dashboard with Mass branding, 3-step Scan → Review → Optimize flow, stats, and recent scans.
* Added timed 15-minute scan sessions and admin-bar one-off frontend scans.
* Scan mode UI: show **Start 15-minute scan** when idle; show **Stop scan mode** only while a session is active.
* Added Scans list, Page Reports, Optimize (rules), History (rollbacks), Logs, and Settings under Asset Manager.
* Admin menu stays expanded on all plugin screens; Reports and Logs are visible submenu items.
* Page report: bulk optimize bar with action + scope controls and unsafe-disable confirmation.
* Added rule actions: Disable, Enable (only load on selected scope), Async, Defer, Delay.
* Added rule scopes: entire site, this page/post, all singles, post type, taxonomy archive, URL contains.
* Page report shows current-rule badges per asset (action + scope; paused rules marked).
* Grouped asset inspector by origin (WordPress core, plugins, themes, MU-plugins, external, inline/other).
* Added top select-all plus per-group select for bulk actions.
* Added live search filter for handle, source URL, plugin/theme label, type, and dependencies.
* Enable/Disable and load-strategy rules create History snapshots; bulk apply uses one snapshot per batch.
* Frontend optimizer applies matching rules safely; Enable removes assets outside the allow scope.
* Core asset protection, dependents checks, and simulate-disable via REST.
* REST API (`massoftind-am/v1`) and WP-CLI (`massoftind-am`) for manage_options users.
* Activity logs, debug mode, retention settings, and opt-in uninstall data cleanup.
* WordPress.org readiness: readme.txt, license.txt, blueprint.json, Tested up to 7.0.
* Plugin Check cleanup: translators comments, no manual textdomain load, safer `$wpdb->prepare()` / `%i` usage, per-ID deletes instead of dynamic IN lists, intentional schema-change ignores for uninstall drops.
* Removed Plugin URI until a published product page exists (avoids a broken “Visit plugin site” link).
* Plugins screen branding mark + Open action; menu uses dashicons-performance.

== Upgrade Notice ==

= 1.0.2 =
Adds the new WordPress.org branding assets, updated screenshots, and a refreshed admin interface with improved usability.

= 1.0.1 =
Contributors list and admin-notice scope updated for WordPress.org review.

= 1.0.0 =
Initial release of Massoftind Asset Manager — scan frontend assets, apply safe optimize rules, and roll back from History.
