PHPackages                             apermo/site-bookkeeper-reporter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. apermo/site-bookkeeper-reporter

ActiveWordpress-plugin

apermo/site-bookkeeper-reporter
===============================

A WordPress site-bookkeeper-reporter plugin.

v0.1.1(yesterday)00[1 issues](https://github.com/apermo/site-bookkeeper-reporter/issues)GPL-2.0-or-laterPHPPHP &gt;=8.2CI passing

Since Apr 3Pushed yesterdayCompare

[ Source](https://github.com/apermo/site-bookkeeper-reporter)[ Packagist](https://packagist.org/packages/apermo/site-bookkeeper-reporter)[ RSS](/packages/apermo-site-bookkeeper-reporter/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

Site Bookkeeper Reporter
========================

[](#site-bookkeeper-reporter)

A monitoring tool for your WordPress Sites — Reporter Plugin

[![PHP CI](https://github.com/apermo/site-bookkeeper-reporter/actions/workflows/ci.yml/badge.svg)](https://github.com/apermo/site-bookkeeper-reporter/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/3c908e431a9e615a3a2138248830be6f99a34a9f3c01dd4949126534809ccda6/68747470733a2f2f636f6465636f762e696f2f67682f617065726d6f2f736974652d626f6f6b6b65657065722d7265706f727465722f67726170682f62616467652e737667)](https://codecov.io/gh/apermo/site-bookkeeper-reporter)[![License: GPL v2+](https://camo.githubusercontent.com/996c3451ae01accccbdbaaa15299d3a015844792e6de4a884a5d12f1356bacd4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76322b2d626c75652e737667)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/15981520647c59ab3656a11a341da8435685725861bd6813787f967b2695cdcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617065726d6f2f736974652d626f6f6b6b65657065722d7265706f72746572)](https://packagist.org/packages/apermo/site-bookkeeper-reporter)[![PHP Version](https://camo.githubusercontent.com/001d723ccaba1cf01bc19be24a2b677304527a37c0a667cf7f43c87e84d35b3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f617065726d6f2f736974652d626f6f6b6b65657065722d7265706f727465722f706870)](https://packagist.org/packages/apermo/site-bookkeeper-reporter)

WordPress plugin that collects site health data (core version, plugins, themes, users, roles, custom fields) and pushes it to a central [Site Bookkeeper Hub](https://github.com/apermo/site-bookkeeper-hub) on a twice-daily cron schedule.

Requirements
------------

[](#requirements)

- PHP 8.2+
- WordPress 6.2+
- A running [Site Bookkeeper Hub](https://github.com/apermo/site-bookkeeper-hub) instance

Installation
------------

[](#installation)

Install via Composer:

```
composer require apermo/site-bookkeeper-reporter
```

Activate the plugin and configure the hub URL and token in **Settings &gt; Site Bookkeeper**, or define constants in `wp-config.php`:

```
define( 'SITE_BOOKKEEPER_HUB_URL', 'https://monitor.example.tld' );
define( 'SITE_BOOKKEEPER_TOKEN', 'your-site-token-here' );
```

### HTTPS Requirement

[](#https-requirement)

The hub URL **must use HTTPS**. The plugin rejects HTTP URLs in the settings form and refuses to push reports over plain HTTP. This protects your authentication token from being transmitted in clear text.

For local development (e.g. DDEV), you can bypass this check by defining:

```
define( 'SITE_BOOKKEEPER_ALLOW_HTTP', true );
```

WP-CLI Commands
---------------

[](#wp-cli-commands)

```
wp bookkeeper-reporter report          # Push a report immediately
wp bookkeeper-reporter status          # Preview collected data without pushing
wp bookkeeper-reporter test            # Test connection to the hub
wp bookkeeper-reporter network-report  # Push network report (multisite)
wp bookkeeper-reporter network-status  # Preview network data (multisite)
```

### Bulk Setup via WP-CLI

[](#bulk-setup-via-wp-cli)

If you manage many WordPress sites (e.g. via [wp-cli/config-command](https://developer.wordpress.org/cli/commands/config/)or a shared deployment tool), you can script the setup across all of them.

**Example: register and configure all sites managed by WP-CLI's `@alias` system:**

```
#!/usr/bin/env bash
set -euo pipefail

HUB_URL="https://monitor.example.tld"
HUB_CLI="php /path/to/site-bookkeeper-hub/bin/manage.php"

# List all WP-CLI aliases (one per managed site)
for alias in $(wp cli alias list --format=json | jq -r 'keys[]'); do
    echo "--- Setting up ${alias} ---"

    site_url=$(wp @"${alias}" option get siteurl)

    # Register the site on the hub and capture the token
    token=$($HUB_CLI site:add "${site_url}" --label="${alias}" 2>&1 | grep "Bearer token" -A1 | tail -1 | tr -d ' ')

    # Write constants to wp-config.php
    wp @"${alias}" config set SITE_BOOKKEEPER_HUB_URL "${HUB_URL}" --type=constant --raw
    wp @"${alias}" config set SITE_BOOKKEEPER_TOKEN "${token}" --type=constant --raw

    # Activate the plugin and push an initial report
    wp @"${alias}" plugin activate site-bookkeeper-reporter
    wp @"${alias}" bookkeeper-reporter report

    echo "    ${site_url} → registered and reporting"
done
```

**Example: loop over sites listed in a simple text file:**

```
#!/usr/bin/env bash
set -euo pipefail

HUB_URL="https://monitor.example.tld"
HUB_CLI="php /path/to/site-bookkeeper-hub/bin/manage.php"
SITES_FILE="./sites.txt"  # One SSH path per line, e.g. user@host:/var/www/site

while IFS= read -r ssh_path; do
    [[ -z "${ssh_path}" || "${ssh_path}" == \#* ]] && continue

    echo "--- Setting up ${ssh_path} ---"

    site_url=$(wp --ssh="${ssh_path}" option get siteurl)
    token=$($HUB_CLI site:add "${site_url}" --label="${ssh_path}" 2>&1 | grep "Bearer token" -A1 | tail -1 | tr -d ' ')

    wp --ssh="${ssh_path}" config set SITE_BOOKKEEPER_HUB_URL "${HUB_URL}" --type=constant --raw
    wp --ssh="${ssh_path}" config set SITE_BOOKKEEPER_TOKEN "${token}" --type=constant --raw
    wp --ssh="${ssh_path}" plugin activate site-bookkeeper-reporter
    wp --ssh="${ssh_path}" bookkeeper-reporter report

    echo "    ${site_url} → registered and reporting"
done  'my_check',
        'label'  => 'My Custom Check',
        'value'  => 'All good',
        'status' => 'good', // good, warning, critical, or omit
    ];
    return $fields;
} );
```

Development
-----------

[](#development)

```
composer install
composer cs              # Run PHPCS
composer cs:fix          # Fix PHPCS violations
composer analyse         # Run PHPStan
composer test:unit       # Run unit tests
```

Related
-------

[](#related)

- [Site Bookkeeper Hub](https://github.com/apermo/site-bookkeeper-hub) — Central API that stores and serves the collected data
- [Site Bookkeeper Dashboard](https://github.com/apermo/site-bookkeeper-dashboard) — WordPress admin dashboard for viewing site health data across all monitored sites

License
-------

[](#license)

[GPL-2.0-or-later](LICENSE)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/910b8010a35a86821d0b90d645374f5ae484513f2c195818e4c54bc0175d12e1?d=identicon)[apermo](/maintainers/apermo)

---

Top Contributors

[![apermo](https://avatars.githubusercontent.com/u/4695889?v=4)](https://github.com/apermo "apermo (42 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apermo-site-bookkeeper-reporter/health.svg)

```
[![Health](https://phpackages.com/badges/apermo-site-bookkeeper-reporter/health.svg)](https://phpackages.com/packages/apermo-site-bookkeeper-reporter)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
