=== 404ops User Feedback ===
Contributors: spwhite
Tags: feedback, bug reports, contact form, support, comments
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 2.20.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Collect feedback and bug reports through custom forms, a widget, or a quick-feedback button, with admin reply and status tracking.

== Description ==

404ops User Feedback lets your users send comments, questions and bug reports, and gives administrators a dashboard to triage, reply to and resolve them. Submitting needs a logged-in user by default. Logged-out visitors can be let in per form or site-wide.

**What's included:**

* Form Builder: create categories, then custom forms with dropdown, text, textarea, file-upload, NPS, CSAT and thumbs fields. Each form has its own shortcode, `[userfeedback form="your-form"]`.
* Form rules: restrict a form by post type, by specific post or page, or by viewer role. Leave an axis blank and it is unrestricted.
* Quick Feedback: a button for logged-in users, in the admin bar or on the page, that can attach the page URL, browser, screen size, timezone and JavaScript console errors.
* Guest submissions (off by default): protected by a honeypot, a minimum time to submit, and a per-IP limit.
* Screenshots: logged-in users can attach an image, stored in the Media Library. Guests cannot upload files.
* Submissions dashboard: filter, search, reply with reusable canned responses, set status (New, In Progress, Testing, Resolved, Won't Fix), run bulk actions, and export to CSV.
* Email notifications through WordPress's own wp_mail(). Each can be turned off, and a category can name its own recipients.
* Duplicate detection: recent similar reports are scored without AI, and new submissions can be flagged with their best match.
* Help desk: a Feedback Agent role that sees only its own queue, departments, routing rules (by form, category or keyword; round-robin, fewest open or a named agent), tags, SLA tracking and escalation rules.
* Reports: volume over time, time to first reply and to resolution by department, agent, category and tag, a Dashboard widget, and CSV export.
* Migration from Awesome Support, SupportCandy or Fluent Support.
* Outbound webhooks (off until configured): signed generic JSON or native Slack/Discord events to a public HTTPS endpoint you choose.
* Optional AI features, using your own provider account: Draft with AI in the reply box, and Check with AI for duplicates.
* User Feedback tools for AI agents through 404ops AI Agent Connector. Every change an agent proposes needs approval.

Submissions, forms and canned responses are stored in your own database. The External services section lists every outside service the plugin can contact, and when.

== Installation ==

1. Upload the plugin through `Plugins > Add New > Upload Plugin`, or copy it to `wp-content/plugins/`.
2. Activate 404ops User Feedback through the `Plugins` screen.
3. Open `404ops > User Feedback` in the admin sidebar. The plugin's other screens - Form Builder, Responses and Settings - are reached from the navigation row across the top of that page, not from the sidebar.
4. Open `Form Builder` from that navigation row to create a category and a form (or use the built-in legacy form via `[user_feedback]`).
5. Place `[userfeedback form="your-form"]` (or `[user_feedback]`) on a page, add the Feedback widget to a sidebar, or enable the Quick Feedback button on the `Settings` screen.

== Frequently Asked Questions ==

= Where can I get help? =

Visit https://supportminer.404ops.com to open a support request.

= Does this plugin send data to an external service? =

Only if you turn on an optional feature: outbound webhooks (you add the endpoint), or the AI features Draft with AI and Check with AI (you connect your own provider). Each one is described in the External services section. Submissions, forms, categories, and canned responses are stored only in this site's WordPress database. Email notifications are sent using WordPress's own `wp_mail()` function.

= Who can submit feedback? =

By default, only logged-in users. Guest (logged-out) submissions are off out of the box and have to be enabled deliberately, in either of two places:

* **Per form** - the "Allow guest (logged-out) submissions" checkbox on a form in the Form Builder.
* **Site-wide** - "Allow Guest Submissions Globally" on the `Settings` screen's `Guest Submissions` tab. This is an override: it opens every form to guests regardless of each form's own checkbox.

Either switch applies to the form shortcodes and to the sidebar widget. The Quick Feedback button is the exception: it is never rendered for a logged-out visitor, so opting a form or the whole site into guest submissions does not put that button in front of one.

= How are guest submissions protected from spam? =

Three checks run on every logged-out submission, none of which contact a third-party service or show a CAPTCHA:

* A **honeypot** field a real visitor never sees and never fills in.
* A **minimum time-to-submit** - a submission arriving less than 3 seconds after the form rendered, or carrying no render timestamp at all (meaning the page's JavaScript never ran), is treated as automated.
* A **per-IP rate limit** - 5 submissions per 15 minutes from one address. Every logged-out attempt counts toward it, including ones the other two checks catch.

A submission that trips the honeypot or the timing check is discarded silently and answered as though it succeeded, so a bot learns nothing from the response. One that hits the rate limit gets a plain "please wait a bit" message instead, because a real visitor on a shared connection can reach it legitimately.

Both thresholds and the client-IP resolution are deliberately code-level rather than settings, and are adjustable with the `user_feedback_guest_min_time_seconds`, `user_feedback_guest_rate_limit_max`, `user_feedback_guest_rate_limit_window`, and `user_feedback_client_ip` filters. The last is what a site behind a reverse proxy or CDN needs, since only `REMOTE_ADDR` is trusted by default.

These are deterrents against ordinary spam bots, not a guarantee. They will not stop a determined human, a bot written against this form specifically, or a distributed sender, and they are not a substitute for a CAPTCHA or a moderation queue if your site needs harder assurances.

= What is stored about a guest submitter? =

The submitter's IP address, anonymized - WordPress's own `wp_privacy_anonymize_ip()` zeroes the last part of the address before it is saved. That is the default, and it can be changed to storing nothing at all on the `Guest Submissions` settings tab. The full address is never written to the database; the per-IP rate limit hashes it into a short-lived transient either way. No IP is collected for logged-in submitters, who are identified by their account instead.

A guest-enabled form also offers an optional email address field, so a guest can leave a reply-to address if they want a reply to actually reach them (see the next question). It is entirely optional, and used for nothing beyond that reply and WordPress's own Tools > Export/Erase Personal Data flow, which can find and act on a guest's submissions by that same address — see "Is a guest's data reachable by a personal-data request?" below.

= Can I reply to a guest submission? =

You can always write one; whether it is emailed depends on whether that guest left a reply-to address at submission time. If they did, a reply goes to it exactly as it would to a logged-in submitter's account, and the dashboard reports it as sent. If they left it blank — which is also the answer for every guest submission made before this address field existed — the reply is saved on that submission as an internal note and shown on the dashboard like any other reply, useful as a record of what was decided, but the submitter never sees it. Either way, the reply box tells you which outcome to expect before you write it, and the dashboard confirms what actually happened afterwards.

The same undeliverable case applies to a submission whose author has since been deleted, and to the "resolved" notification: with no account to mail, the status change and its resolution notes are still recorded and still appear in the changelog, but nothing is emailed. That is true even for a guest who left a reply-to address — only a reply uses it, not a resolved notice. The status dialog says so while you are writing the notes, and reports the change as made without a notification afterwards.

= Is a guest's data reachable by a personal-data request? =

Yes, if they left a reply-to address. WordPress's Tools > Export/Erase Personal Data flow is keyed by an email address, and this plugin matches that address against a guest submission's reply-to field the same way it matches a logged-in submitter's account — a request for `dana@example.test` finds and exports or anonymizes every submission that address is on, guest and account alike. Erasing one clears the reply-to address itself, not just the submission's content. A guest submission that never left an address is the one real gap: with nothing to match against, it is not reachable through this automated flow (the same limitation WordPress core has for a comment posted without a name or email) — a site owner can still find and delete or anonymize a specific one manually from the dashboard.

= Can I ask how satisfied someone was once their submission is resolved? =

Yes. Turn on "Satisfaction check" under Settings → Email Notifications and the resolved email ends with "How did we do?" and five one-click links, 1 to 5, that need no sign-in. The link carries a token made from the submission and your site's secret keys, so it only ever rates that one submission; clicking it shows a short thank-you page and nothing about the submission. The rating appears on the submission on the dashboard and as an average ("Satisfaction") across everything rated. It counts as the person's own data: it is included in their personal-data export and cleared by an erasure request. Guests who left no email address are never asked. Off by default, because it adds to an email the submitter did not ask for. One caveat of one-click links: an email security scanner that follows links can record a rating on the person's behalf; the person can click again to change it.

= Can the team keep notes on a submission that the submitter never sees? =

Yes. On a submission, tick "Internal note" before sending from Quick Reply or Full Reply, and the text is kept on the submission for the team instead of being sent: it appears under "Internal notes (not visible to the submitter)" with who wrote it and when, and the reply field is left as it was. Internal notes are never emailed, never included in a reply, never part of the submitter's personal-data export or the CSV export. Like replies and resolution notes, they are the site's own record and stay with the submission through a privacy erasure request.

= Who can see submissions? =

Administrators (users with the `manage_options` capability) see and manage everything at `404ops > User Feedback`. A Feedback Agent sees and works only the submissions assigned to them or to their departments. The optional `[userfeedback_submissions]` shortcode can show a read-only list of a category's submissions to logged-in users, but only for categories an administrator has explicitly marked as frontend-visible.

= Is there a REST API for reading and creating submissions? =

Yes. A read + create REST API lives under `ops404-user-feedback/v1`: `GET /submissions` (paginated, with the dashboard's own filters), `GET /submissions/<id>`, and `POST /submissions`. There is no custom token system — authentication is WordPress core: reading requires the same `manage_options` capability as the dashboard (anonymous requests get 401, unprivileged users 403), and creating serves the same population the feedback form itself serves, so any logged-in user may create, as may anonymous callers when guest submissions are enabled (they pass through the same per-IP rate limit and anti-bot traps as the form). External clients authenticate with an Application Password (Users → Profile → Application Passwords) sent as Basic auth over HTTPS; JavaScript on the site uses the logged-in cookie with the `X-WP-Nonce` header. Responses expose only the fields the dashboard list shows — never raw metadata, admin replies, resolution notes, or internal notes. See the REST API section of the project README for the full route, authentication, and field reference.

= Can submitters see the status of their own feedback? =

Yes. Add the `[user_feedback_my_submissions]` shortcode to any page and a logged-in user sees a paginated list of only their own submissions — subject, category, type, status, and both dates — with a link through to each one's full detail, including any reply or resolution notes exactly as they would have been emailed. It never shows a guest submission, even one left with that user's own email address (a guest has no account to own it by, so it stays out of reach here; a guest can only learn of a reply by email), and it never shows an internal note, including to an administrator viewing the portal as themselves. A logged-out visitor sees only a short sentence and a login link; requesting someone else's submission by its id shows the same "not found" response as a submission that does not exist, so it cannot be used to confirm one exists. This shortcode is read-only: it offers no reply, reopen, or delete action. The list query is adjustable with the `user_feedback_my_submissions_query_args` filter, which can narrow or reorder a viewer's own list (by status or search, say) but can never widen it: whose submissions it shows is enforced afterward and cannot be changed by anything hooked on that filter.

= Does the plugin track SLA priority and due dates? =

Yes. Every submission has a priority — Low, Normal, High, or Urgent — and a due date computed from when it was created plus a response target that an administrator sets per priority (Settings → SLA; defaults are 4 hours for Urgent, 24 for High, 72 for Normal, and 168 for Low). A submission's priority defaults to Normal until an administrator changes it, and changing it recomputes the due date from the submission's original creation time. An administrator can also set or clear a due date by hand from the submission's own controls on the dashboard, independent of its priority. The dashboard shows both, can filter by priority and by "overdue only," and can sort by due date (a submission with no due date always sorts last). "Overdue" is worked out fresh each time the dashboard is loaded, from the due date and status — it is never stored — and a Resolved or Won't Fix submission is never counted as overdue, however late it is. This release does not send a notification or email for an overdue submission; only the dashboard shows it. Priority and due date are not personal data, so they are not part of the submitter's personal-data export, but they do appear in the CSV export like every other dashboard column.

= Can users attach files? =

Yes, if attachments are enabled on the plugin's Settings screen (`404ops > User Feedback`, then `Settings` in the navigation row across the top of the page). Users can upload a screenshot or paste one from the clipboard; it's stored as a WordPress media library attachment. Administrators can configure the maximum file size and allowed file types.

Attachments are for logged-in submitters only. The upload endpoint requires a logged-in user, and a file field is left out entirely when a form is rendered for a guest, so a guest-enabled form simply shows no upload control to a logged-out visitor.

= When is an attachment deleted, and why is one sometimes kept? =

Deleting a submission, or answering a personal-data erasure request, also deletes the attachment the submission carried, but only when the plugin can prove the file was its own. It records who uploaded each file at upload time, and deletes only a file that is marked as the plugin's, belongs to the person the submission belongs to, and is not referenced by any other submission.

Anything it cannot prove is kept, and the erasure report says so rather than reporting a deletion that did not happen. A file is kept when it is shared by more than one submission, when the media library says somebody else uploaded it, or when it is not an image the uploader could have produced. Keeping a file that might belong to someone else is the safer mistake, and an administrator can always delete it by hand from the Media Library.

Files uploaded before version 2.3 were stored without that record. On upgrade the plugin restores it for the files it can still identify, by matching the submission's owner against the uploader the media library recorded, which is a fact no submitter could influence. Files that fail that match stay in the Media Library and are reported as retained.

= What happens to the old `[user_feedback]` shortcode? =

It still works. It is automatically mapped to an auto-generated form in the Form Builder so legacy comment/bug submissions keep working alongside the newer custom forms.

= What happens when I deactivate or uninstall the plugin? =

Deactivation keeps all forms, submissions, settings, and Media Library attachments so you can reactivate without losing feedback history. On a single site, deleting the plugin attempts to remove its settings, feedback tables, and database-backed guest rate-limit transients. It does not flush WordPress's shared cache; externally cached rate-limit entries expire normally. Media Library attachments are deliberately retained because they are normal WordPress content and may be reused outside the plugin.

On multisite, ask a host administrator to use the coordinated removal tool from the [User Feedback product page](https://404ops.com/plugins/404ops-user-feedback). Remove Pro first if installed. The tool checks every site and network for active use before removing plugin data and moving the shared plugin directory to private quarantine. WordPress's usual uninstall action stops on multisite. WP-CLI file-only deletion bypasses the uninstall handler and requires the tool's host guard. If the host cannot meet the tool's requirements, keep the deactivated package installed.

Media Library attachments and their stored upload provenance, shared 404ops AI settings and agents' shared availability flags are retained. An agent can switch off their own away flag before removal. The plugin's submission privacy eraser does not erase the flag.

== External services ==

Submissions, forms, categories, canned responses and reports are stored only in this site's WordPress database. Email notifications use WordPress's own wp_mail(). The plugin contacts an outside service only for the optional features below, and only when you turn them on and configure them.

**Outbound webhooks (optional).** Only if you add an endpoint under Settings > Webhooks. Choose signed generic JSON (includes submission fields) or native Slack/Discord (event name only, without submission content or personal details). Events are sent in the background when enabled submission events occur; an empty endpoint disables delivery. Destinations must use public HTTPS on port 443, with checked DNS, a pinned verified TLS connection and no redirects. The receiving service is yours to choose, and its own terms and privacy policy apply. For the optional native formats, see Slack’s [terms of service](https://slack.com/terms-of-service) and [privacy policy](https://slack.com/trust/privacy/privacy-policy), or Discord’s [terms of service](https://discord.com/terms) and [privacy policy](https://discord.com/privacy).

**AI providers (optional).** Only if you connect a provider on the shared AI Connection screen (404ops > AI Connection) and use one of these features:

* Draft with AI, in the reply box. It sends the submission's subject, the submitter's message, status, priority and type, and the submitter's email address, to the provider. The draft is shown for you to edit. The AI never sends a reply or stores anything.
* Check with AI, for duplicate detection. It sends only the subject and message of the top candidates, with email addresses, IP addresses, phone numbers and names replaced. The screen shows exactly what was sent.

The providers are OpenAI (`api.openai.com`), Anthropic (`api.anthropic.com`), Google Gemini (`generativelanguage.googleapis.com`), OpenRouter (`openrouter.ai`, which forwards the request to the model you selected), an OpenAI-compatible base URL you enter, and Ollama (by default `localhost`). Each provider's own terms and privacy policy apply to the request.

AI provider policy references for the optional shared AI connection:

* OpenAI: [API services agreement](https://openai.com/policies/services-agreement/) and [privacy policy](https://openai.com/policies/privacy-policy/).
* Anthropic: [commercial terms](https://www.anthropic.com/legal/commercial-terms) and [privacy policy](https://www.anthropic.com/legal/privacy).
* Gemini: [API terms](https://ai.google.dev/gemini-api/terms) and [Google privacy policy](https://policies.google.com/privacy).
* OpenRouter: [terms](https://openrouter.ai/terms) and [privacy policy](https://openrouter.ai/privacy). OpenRouter can route requests to another model provider; review the provider selected in your account as well.

For Ollama or an OpenAI-compatible endpoint, requests go to the server URL you configure. Review that server operator's terms and privacy policy. The plugin sends requests to the configured address; its operator determines any onward processing. The information sent and the actions that trigger a request are described above.

== Screenshots ==

1. Submissions dashboard with status counters and filters.
2. Form Builder: the category list and the Add New Category form.
3. Settings: email notification options and sender details.
4. Settings: Quick Feedback Collector and navigation menu link options.
5. Settings: file attachment toggle, maximum file size, and allowed file types.

== Changelog ==

= 2.20.7 =
* Preserve another site’s feedback and schedules during multisite removal. Use the coordinated removal tool after deactivating the packages throughout the installation.
* Preserve the notification effect approved in agent actions and surface unavailable SLA counts or uncertain availability updates.

= 2.20.6 =
* Fix: reporter reply attachments are reported as saved only after their message link is stored; failed writes roll back owned references without reopening claims that remain referenced.

= 2.20.5 =
* Documentation: shorten the readme changelog and bundle the earlier release notes in CHANGELOG-ARCHIVE.txt.
* Maintenance: keep Free and Pro release metadata aligned; no runtime behaviour change.

= 2.20.4 =
* Updated: bundled shared AI client 0.4.3 with hardened connection nonce handling.
* Fixed: normalize the reporter reply nonce before verification.

= 2.20.3 =
* Added: guarded read-only administrative status interfaces.
* Added: five bundled draft language catalogs with checked WordPress loading.
* Improved: development test-session and catalog packaging checks.

= 2.20.2 =
* Fixed: apostrophes and quotation marks in replies, resolution notes, category and form names, settings and list searches are no longer saved or e-mailed with a stray backslash.
* Fixed: the answers on a submitted form are now cleaned and size-limited before they are stored, like the rest of a submission.
* Fixed: the default-status setting only accepts the statuses it offers.

= 2.20.1 =
* Updated the licence client (0.3.5): Pro keeps working after a licence expires.

= 2.20.0 =
* New: routing rules by form category and by keywords, with round-robin, fewest-open or named-agent assignment, and an "I'm away" switch that routing skips.
* New: tags on submissions, with a filter and a tag column in the CSV export, REST and webhooks.
* New: Reports break down volume and response times by department, agent, category and tag, over up to 12 months; a Dashboard widget shows each person's queue.
* New: reply collision warning, agent transfer and AI assists for agents (both off until an administrator allows them), and agents' own satisfaction figures.
* Fixed: the image preview on form-builder file fields now shows.

Earlier readme release notes are preserved in the bundled CHANGELOG-ARCHIVE.txt.

== Upgrade Notice ==

= 2.20.3 =
Includes checked draft translations and administrative status reporting. Human linguistic review is separate.

= 2.20.0 =
Adds tags (a database update runs automatically), richer routing and team reports. Safe to update.

= 2.18.4 =
Readme and WordPress.org listing corrections only; no change to plugin behaviour. Safe to update.

= 2.18.3 =
Bundled libraries updated. Safe to update.

= 2.18.2 =
Now requires WordPress 7.0 or newer and is tested up to 7.1. Safe to update.

= 2.18.1 =
Now requires WordPress 6.9 or newer and is tested up to 7.1. Safe to update.

= 2.18.0 =
Canned responses can be limited to a department and can use placeholders such as the reporter's name. Safe to update.

= 2.17.0 =
Adds a Migrate screen for moving tickets over from Awesome Support, SupportCandy or Fluent Support. Safe to update.

= 2.16.0 =
Bundles its own prefixed UI kit. Safe to update.

= 2.15.0 =
Adds User Feedback tools for AI agents through Agent Gate; every change still needs approval. Safe to update.

= 2.14.1 =
Maintenance release: AI features use a private copy of the AI client; re-enter your AI connection once. Safe to update.

= 2.14.0 =
Adds department calendars, next-response targets, escalations and a daily digest to SLAs. Review your SLA settings after updating.

= 2.13.0 =
Adds REST fields and filters, webhook events, CSV columns and a duplicates report for the help-desk features. Safe to update.

= 2.12.0 =
Adds an optional reply link for reporters. Off until enabled. Safe to update.

= 2.11.1 =
Completes the 2.11.0 release (SLAs and per-agent reports). Safe to update.

= 2.11.0 =
Adds optional service-level targets and an SLA report. Off until enabled. Safe to update.

= 2.10.0 =
Adds duplicate detection with optional AI checking. Safe to update.

= 2.9.0 =
Adds feedback agents, departments, assignment and routing. Nothing changes until an administrator sets up agents. Safe to update.

= 2.8.0 =
Adds Reports and fixes a CSV-export security issue (formula injection) — update recommended.

= 2.6.0 =
* Feature release. No configuration changes needed.
= 2.4.0 =
wp.org submission readiness and a fix for a fatal error in the sidebar widget.
