=== Code Pulse ===
Contributors: codepulse01
Tags: code review, static analysis, security, code quality, developer
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Review your site's theme and plugin code with Code Pulse. No GitHub, Bitbucket or Azure token needed — just a key from your Code Pulse account.

== Description ==

Code Pulse reviews the code your site actually runs and tells you what is wrong with it:
SQL built by string concatenation, unescaped output, missing capability checks, unvalidated
uploads, and the ordinary quality problems that pile up in a theme over the years.

Most code-review tools want access to your Git provider. This plugin does not. You paste one
key from your Code Pulse account, press **Scan now**, and the plugin sends the source of the
themes and plugins you choose to Code Pulse for analysis. Nothing is installed on your
server beyond this plugin, and no Git credentials are ever created or stored.

**You need a Code Pulse account.** The plugin does nothing without a key, and a key only
works while your subscription is active.

= What this plugin does =

* Collects the PHP, JS, CSS and template source of the themes and plugins you select
* Redacts anything credential-shaped before it leaves your server
* Uploads that source to Code Pulse over HTTPS and shows the findings in your admin
* Lets you revoke the key at any time from your Code Pulse account

= What is never sent =

* `wp-config.php` and any `.env` file
* database contents, user accounts, passwords, posts, orders, customer data
* uploads, media, images, archives and any other binary file
* private keys and certificates (`.pem`, `.key`, `.p12`, …)
* anything under `node_modules`, `vendor`, `.git` or a build directory

Anything credential-shaped still left inside a source file — an API key, a `define( 'AUTH_KEY',
… )`, a password in a database URL — is replaced with `[REDACTED:…]` **before** the upload is
assembled. Every scan shows you what it skipped and what it redacted.

== External services ==

This plugin relies on a third-party service, **Code Pulse** (https://code-pulse.ai), to
analyse your code. The plugin cannot work without it.

* **What is sent:** the text source of the themes and plugins you select for a scan, after
  the exclusions and redaction described above; the name of your site; and the plugin
  version. Your extension key is sent as an HTTP `Authorization` header to identify your
  account.
* **When it is sent:** only when you press **Scan now** in the plugin's settings screen, or
  when you run a scheduled scan that you have enabled yourself. The plugin makes no network
  calls until you have entered a key and asked for a scan.
* **Where it is sent:** `https://project-estimate.code-pulse.ai` over HTTPS, or the host you
  configure if you run Code Pulse on your own domain.
* **Why:** the analysis runs on Code Pulse's servers; that is the service you are subscribing
  to.
* **Retention:** uploaded source is deleted automatically after 14 days by a scheduled job.

**AI analysis sub-processor.** Code Pulse performs the analysis using the OpenAI API, so the
redacted source of the files being analysed is sent to OpenAI as part of that request. Per
OpenAI's API documentation, data sent through the API is not used to train their models
unless the customer opts in, which Code Pulse has not; OpenAI retains API data for up to 30
days for abuse monitoring. No other third party receives your code.

OpenAI terms of use: https://openai.com/policies/row-terms-of-use/
OpenAI privacy policy: https://openai.com/policies/row-privacy-policy/

Code Pulse terms of service: https://code-pulse.ai/terms
Code Pulse privacy policy: https://code-pulse.ai/privacy
Full disclosure of what is sent: https://code-pulse.ai/extension/data

== Installation ==

1. Install and activate the plugin.
2. Create a key in your Code Pulse account under **Extensions**. It is shown once.
3. Go to **Tools → Code Pulse** and paste the key.
4. Choose which themes and plugins to include, then press **Scan now**.

To store the key outside the database, define it in `wp-config.php` instead:

`define( 'CODEPULSE_KEY', 'cp_ext_...' );`

== Frequently Asked Questions ==

= Do I need a GitHub or Bitbucket token? =

No. That is the point of this plugin. The code is read from your own server, so Code Pulse
never needs access to your repository host.

= Is my database or customer data sent anywhere? =

No. Only source files are collected, and only from the themes and plugins you select. The
database is never read for a scan.

= What happens if I cancel my subscription? =

The key stops working on its next call. Nothing on your server keeps running, and nothing
is cached that outlives your plan.

= Can I see what would be uploaded before I send anything? =

Yes. The settings screen has a preview that lists every file that would be included, and
every file that was skipped and why, without sending anything.

= Where can I read exactly what is sent? =

https://code-pulse.ai/extension/data lists every exclusion, every redaction rule, the
retention period and the sub-processor. The plugin's Preview button shows the same thing for
your own site, without sending anything.

= How do I revoke a key? =

In your Code Pulse account, under **Extensions**, press **Revoke**. The key stops working
immediately.

== Screenshots ==

1. The settings screen: paste the key, choose which themes and plugins to include, and set any extra exclusions.
2. Preview — every file a scan would upload, every file it would leave behind, and why. Nothing is sent.

== Changelog ==

= 1.0.0 =
* First public release.

== Upgrade Notice ==

= 1.0.0 =
First public release.
