Skip to content

Commit 230262e

Browse files
Tsvetan StoychevTsvetan Stoychev
authored andcommitted
Make plugin documentation release-ready
1 parent fd05c93 commit 230262e

11 files changed

Lines changed: 252 additions & 389 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing to Basicrum
2+
3+
Thank you for improving Basicrum. Contributions should preserve the plugin's privacy-first defaults, WordPress compatibility boundaries, and installable ZIP quality.
4+
5+
## Before starting
6+
7+
- Search existing issues and pull requests before opening a duplicate.
8+
- Use a public issue for ordinary defects and proposals.
9+
- Follow [SECURITY.md](SECURITY.md) for suspected vulnerabilities.
10+
- Keep changes focused and explain any administrator-visible behavior change.
11+
12+
## Local setup
13+
14+
Docker, Docker Compose, and Make are required.
15+
16+
```bash
17+
cp .env.example .env
18+
make up
19+
```
20+
21+
The development site is available at <http://localhost:9080/> with `admin` / `basicrum-dev-password`. Run `make help` to list the available checks and test environments.
22+
23+
## Source and conventions
24+
25+
The installable plugin is [`plugins/basicrum/`](plugins/basicrum/). Repository root files provide development, browser-test, Docker, CI, and release tooling.
26+
27+
Follow the permanent conventions in [AGENTS.md](AGENTS.md), including WordPress Coding Standards, PHP 7.4 compatibility, ASCII hyphens, synchronized version metadata, privacy-safe consent behavior, and immutable GitHub Actions pins.
28+
29+
When changing user-facing text, regenerate WordPress translation catalogs. When changing settings, keep defaults, rendering, validation, runtime behavior, tests, and documentation synchronized.
30+
31+
## Verification
32+
33+
Run the checks proportionate to the change. At minimum, PHP changes normally require:
34+
35+
```bash
36+
make lint-php
37+
make lint
38+
make analyse
39+
make unit
40+
make conventions
41+
```
42+
43+
Run `make js-test` for browser or consent behavior. Run `make integration-setup` before the first `make integration` invocation for WordPress integration changes, and use `make woocommerce-e2e` for WooCommerce page types. Changes that affect packaged files or dependencies must also pass:
44+
45+
```bash
46+
make package
47+
make package-verify
48+
make package-smoke
49+
```
50+
51+
The complete release gate is listed in [AGENTS.md](AGENTS.md).
52+
53+
## Pull requests
54+
55+
- Describe the problem, the chosen behavior, and the verification performed.
56+
- Add or update tests for behavior changes and regressions.
57+
- Do not include generated release ZIPs, local configuration, dependencies, or ignored reference material.
58+
- Do not advance release or compatibility metadata without the corresponding release checks.

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Tsvetan Stoychev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 44 additions & 243 deletions
Large diffs are not rendered by default.

‎SECURITY.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported versions
4+
5+
Before the first public release, security fixes are made on the `main` branch. After publication, only the latest released Basicrum plugin version will receive security fixes unless a release notice states otherwise.
6+
7+
## Reporting a vulnerability
8+
9+
Do not report a suspected vulnerability in a public GitHub issue. Contact the maintainer privately through the [Basicrum contact form](https://www.basicrum.com/contact/) and identify the report as a security issue.
10+
11+
Include, where possible:
12+
13+
- the affected plugin version and WordPress/PHP versions;
14+
- the vulnerable component and required configuration;
15+
- reproducible steps or a minimal proof of concept;
16+
- the expected and observed security impact; and
17+
- any suggested remediation or disclosure constraints.
18+
19+
Avoid accessing data that does not belong to you, degrading a live service, or testing against production systems without permission. Please allow time for the report to be reproduced and addressed before public disclosure.
20+
21+
General support questions and non-sensitive defects may use the repository's [public issue tracker](https://github.com/basicrum/wp-plugin/issues).

‎docs/acknowledgments.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Acknowledgments
2+
3+
## WooCommerce page-type ideas
4+
5+
The Basicrum WooCommerce `p_type` taxonomy and its specificity order were informed by these public references:
6+
7+
- [WooCommerce Conditional Tags](https://developer.woocommerce.com/docs/theming/theme-development/conditional-tags)
8+
- [WooCommerce core conditional functions](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/includes/wc-conditional-functions.php)
9+
- [GTM4WP WooCommerce integration](https://github.com/duracelltomi/gtm4wp/blob/master/integration/woocommerce.php)
10+
11+
These projects inspired the page-type ideas only. Basicrum has its own implementation and did not copy source code from them.

‎examples/integrations/README.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ tab under **Consent Tool Connection** in the revealed **Manual Connection
88
Setup** panel.
99

1010
Automatic handling gives WP Consent API priority. Without it, Basicrum selects
11-
a direct Borlabs Cookie 3.2+ or connected modern CookieYes 3.x adapter only when
12-
exactly one is detected. No provider or multiple direct providers leave the
13-
consent loader blocked. Do not also paste an adapter manually while automatic
14-
handling is active. The automatic status panel shows the selection evidence and
15-
next action. Its copyable diagnostics omit the Beacon URL and Brum Site ID.
16-
Detection does not prove that the consent popup publishes the required
17-
decision, so test both allow and deny in a private window.
11+
a direct Borlabs Cookie or CookieYes adapter only when exactly one corresponding
12+
plugin marker is detected. No provider or multiple direct providers leave the
13+
consent loader blocked. The selected adapter still fails closed until its
14+
required browser API reports a decision. Do not also paste an adapter manually
15+
while automatic handling is active. The automatic status panel shows the
16+
selection evidence and next action. Its copyable diagnostics omit the Beacon URL
17+
and Brum Site ID. Detection does not prove that the consent popup publishes the
18+
required decision, so test both allow and deny in a private window.
1819

1920
In manual mode, load the Basicrum consent loader before the selected adapter.
2021
Load one adapter as unblocked site code on every frontend page. The external

‎plugins/basicrum/README.md‎

Lines changed: 13 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,19 @@
1-
=== Plugin Name ===
2-
Plugin Name: Basicrum WordPress Plugin
3-
Plugin URI: https://www.basicrum.com/
4-
Description: Open source Real User Monitoring for WordPress.
5-
Version: 0.0.8
6-
Author: Tsvetan Stoychev
7-
Author URI: https://www.basicrum.com/contact/
8-
License: MIT
9-
License URI: https://opensource.org/licenses/MIT
10-
Text Domain: basicrum
11-
Domain Path: /languages
12-
1+
# Basicrum Plugin Source
132

14-
Here is a short description of the plugin. This should be no more than 150 characters. No markup here.
3+
This directory contains the installable Basicrum WordPress plugin. Runtime PHP, JavaScript, CSS, images, translations, and production Composer dependencies in the release ZIP all come from this boundary.
154

16-
== Description ==
5+
## Entry points
176

18-
This is the long description. No limit, and you can use Markdown (as well as in the following sections).
7+
- `basicrum.php` contains the WordPress plugin header and bootstrap.
8+
- `src/Plugin.php` registers plugin services.
9+
- `src/Assets.php` controls frontend monitoring injection.
10+
- `src/Admin/Settings/` contains settings rendering and validation.
11+
- `readme.txt` is the canonical WordPress.org user documentation and changelog.
12+
- `THIRD-PARTY-NOTICES.md` records bundled software with separate licenses.
13+
- `.distignore` defines development files excluded from releases.
1914

20-
For backwards compatibility, if this section is missing, the full length of the short description will be used, and
21-
Markdown parsed.
15+
## Development
2216

23-
A few notes about the sections above:
17+
Run development and test commands from the repository root. The root [README](../../README.md) contains the quick start, and [AGENTS.md](../../AGENTS.md) lists the complete required checks and repository conventions.
2418

25-
* "Contributors" is a comma separated list of wp.org/wp-plugins.org usernames
26-
* "Tags" is a comma separated list of tags that apply to the plugin
27-
* "Requires at least" is the lowest version that the plugin will work on
28-
* "Tested up to" is the highest version that you've *successfully used to test the plugin*. Note that it might work on
29-
higher versions... this is just the highest one you've verified.
30-
* Stable tag should indicate the Subversion "tag" of the latest stable version, or "trunk," if you use `/trunk/` for
31-
stable.
32-
33-
Note that the `readme.txt` of the stable tag is the one that is considered the defining one for the plugin, so
34-
if the `/trunk/readme.txt` file says that the stable tag is `4.3`, then it is `/tags/4.3/readme.txt` that'll be used
35-
for displaying information about the plugin. In this situation, the only thing considered from the trunk `readme.txt`
36-
is the stable tag pointer. Thus, if you develop in trunk, you can update the trunk `readme.txt` to reflect changes in
37-
your in-development version, without having that information incorrectly disclosed about the current stable version
38-
that lacks those changes -- as long as the trunk's `readme.txt` points to the correct stable tag.
39-
40-
If no stable tag is provided, it is assumed that trunk is stable, but you should specify "trunk" if that's where
41-
you put the stable version, in order to eliminate any doubt.
42-
43-
== Installation ==
44-
45-
This section describes how to install the plugin and get it working.
46-
47-
e.g.
48-
49-
1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
50-
1. Activate the plugin through the 'Plugins' menu in WordPress
51-
1. Place `<?php do_action('plugin_name_hook'); ?>` in your templates
52-
53-
== Frequently Asked Questions ==
54-
55-
= A question that someone might have =
56-
57-
An answer to that question.
58-
59-
= What about foo bar? =
60-
61-
Answer to foo bar dilemma.
62-
63-
== Screenshots ==
64-
65-
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
66-
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
67-
directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
68-
(or jpg, jpeg, gif).
69-
2. This is the second screen shot
70-
71-
== Changelog ==
72-
73-
= 1.0 =
74-
* A change since the previous version.
75-
* Another change.
76-
77-
= 0.5 =
78-
* List versions from most recent at top to oldest at bottom.
79-
80-
== Upgrade Notice ==
81-
82-
= 1.0 =
83-
Upgrade notices describe the reason a user should upgrade. No more than 300 characters.
84-
85-
= 0.5 =
86-
This version fixes a security related bug. Upgrade immediately.
87-
88-
== Arbitrary section ==
89-
90-
You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated
91-
plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
92-
"installation." Arbitrary sections will be shown below the built-in sections outlined above.
93-
94-
== A brief Markdown Example ==
95-
96-
Ordered list:
97-
98-
1. Some feature
99-
1. Another feature
100-
1. Something else about the plugin
101-
102-
Unordered list:
103-
104-
* something
105-
* something else
106-
* third thing
107-
108-
Here's a link to [WordPress](http://wordpress.org/ "Your favorite software") and one to [Markdown's Syntax Documentation][markdown syntax].
109-
Titles are optional, naturally.
110-
111-
[markdown syntax]: http://daringfireball.net/projects/markdown/syntax
112-
"Markdown is what the parser uses to process much of the readme file"
113-
114-
Markdown uses email style notation for blockquotes and I've been told:
115-
> Asterisks for *emphasis*. Double it up for **strong**.
116-
117-
`<?php code(); // goes in backticks ?>`
19+
Do not distribute a ZIP made directly from this directory. Run `make package` from the repository root so Composer production dependencies are rebuilt and the resulting archive is verified.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Third-Party Notices
2+
3+
Basicrum-owned code is licensed under the MIT License in `LICENSE.md`. The plugin also distributes the following third-party software under its own license.
4+
5+
## Boomerang 1.815.60
6+
7+
- Project: [Akamai Boomerang](https://github.com/akamai/boomerang)
8+
- Bundled file: `assets/js/boomr/boomerang-1.815.60.cutting-edge.min.js`
9+
- License: BSD License
10+
- License text: `assets/js/boomr/LICENSE.txt`
11+
12+
The Boomerang copyright notice and license remain applicable to the bundled Boomerang file. Basicrum does not relicense that file under the Basicrum MIT License.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Software Copyright License Agreement (BSD License)
2+
3+
Copyright (c) 2011, Yahoo! Inc.
4+
Copyright (c) 2011-2012, Log-Normal, Inc.
5+
Copyright (c) 2012-2017, SOASTA, Inc.
6+
Copyright (c) 2017-2023, Akamai Technologies, Inc.
7+
All rights reserved.
8+
9+
Redistribution and use of this software in source and binary forms,
10+
with or without modification, are permitted provided that the following
11+
conditions are met:
12+
13+
* Redistributions of source code must retain the above
14+
copyright notice, this list of conditions and the
15+
following disclaimer.
16+
17+
* Redistributions in binary form must reproduce the above
18+
copyright notice, this list of conditions and the
19+
following disclaimer in the documentation and/or other
20+
materials provided with the distribution.
21+
22+
* Neither the name of Yahoo! Inc. nor the names of its
23+
contributors may be used to endorse or promote products
24+
derived from this software without specific prior
25+
written permission of Yahoo! Inc.
26+
27+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
28+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
30+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)