Skip to content

Commit b6c1053

Browse files
committed
plugin 1.0.0
The WordPress client for PlotBird: the tracker on public pages only, a four-step setup whose checks test the real connection, and the statistics screen inside the admin. English and Russian, following the site language.
0 parents  commit b6c1053

24 files changed

Lines changed: 3720 additions & 0 deletions

‎.gitattributes‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Consistent line endings: the plugin is read by PHP and by the WordPress.org
2+
# svn, both of which expect LF.
3+
* text=auto eol=lf
4+
5+
# Binaries: git must not touch these.
6+
*.png binary
7+
*.mo binary

‎.github/workflows/checks.yml‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: checks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
syntax:
15+
name: Syntax on PHP ${{ matrix.php }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
# The plugin header says 7.4, so that is the floor that has to keep
21+
# parsing. WordPress 6.0 supports it too.
22+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
23+
24+
steps:
25+
- uses: actions/checkout@v7
26+
27+
- uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
coverage: none
31+
32+
- name: Show the version under test
33+
run: php -v
34+
35+
- name: Check every PHP file
36+
run: |
37+
set -o pipefail
38+
failed=0
39+
while IFS= read -r file; do
40+
if ! php -l "$file" > /dev/null 2>&1; then
41+
echo "::error file=$file::syntax error"
42+
php -l "$file" || true
43+
failed=1
44+
fi
45+
done < <(find . -name '*.php' -not -path './vendor/*')
46+
exit $failed
47+
48+
- name: Fail on a stray debugging call
49+
run: |
50+
set -o pipefail
51+
if grep -rn --include='*.php' -E '\b(var_dump|print_r|dd)\s*\(' .; then
52+
echo "::error::a debugging call is left in the code"
53+
exit 1
54+
fi
55+
echo "none found"
56+
57+
zip:
58+
name: Release archive
59+
runs-on: ubuntu-latest
60+
needs: syntax
61+
if: startsWith(github.ref, 'refs/tags/v')
62+
permissions:
63+
contents: write # the archive is attached to the release
64+
65+
steps:
66+
- uses: actions/checkout@v7
67+
68+
- name: Build the archive WordPress expects
69+
run: |
70+
set -euo pipefail
71+
mkdir -p build/plotbird-analytics
72+
tar --exclude='./.git' --exclude='./build' --exclude='./.github' -cf - . \
73+
| tar -xf - -C build/plotbird-analytics
74+
cd build && zip -qr plotbird-analytics.zip plotbird-analytics
75+
ls -lh plotbird-analytics.zip
76+
77+
- uses: actions/upload-artifact@v7
78+
with:
79+
name: plotbird-analytics
80+
path: build/plotbird-analytics.zip
81+
82+
- name: Attach it to the release
83+
uses: softprops/action-gh-release@v2
84+
with:
85+
files: build/plotbird-analytics.zip

‎.gitignore‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Files a build or a local test leaves behind.
2+
*.zip
3+
*.log
4+
node_modules/
5+
6+
# Editor and system clutter.
7+
.DS_Store
8+
Thumbs.db
9+
.idea/
10+
.vscode/
11+
*.swp

‎CHANGELOG.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
All notable changes to the WordPress plugin are recorded here. The format
4+
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the
5+
project uses [semantic versioning](https://semver.org/).
6+
7+
## [1.0.0] - 2026-10-19
8+
9+
First public release.
10+
11+
### Added
12+
13+
- Tracking code on public pages only: never in the admin, feeds, previews or
14+
robots responses, and never for logged-in administrators unless you turn that
15+
off.
16+
- Four-step setup wizard with real checks: it fetches `tracker.js` from the
17+
installation and looks for the tracking tag on the front page.
18+
- Statistics screen in the admin: five metrics with sparklines, a pageviews and
19+
visitors chart, top pages, sources, countries with flags, devices, browsers,
20+
and goals. Blocks sit three to a row, and the page uses the full width.
21+
- Period switcher for today, 7 days and 30 days, with a one-minute cache and a
22+
refresh button.
23+
- Share-link reader that refuses a link belonging to another website, and
24+
explains a revoked or expired one instead of showing an empty screen.
25+
- English and Russian screens. The plugin follows the site language and can be
26+
forced to either from the setup screen.
27+
- Bird icon in the admin menu, drawn from the project's own mark.
28+
29+
[1.0.0]: https://github.com/plotbird/wordpress-plugin/releases/tag/v1.0.0

0 commit comments

Comments
 (0)