Implement Phase 9: Prometheus Metrics (v0.9.0)
All checks were successful
Create Release Package / build-release (push) Successful in 1m8s

- Add Prometheus metrics integration via wp-prometheus hooks
- Create Grafana dashboard JSON with 24 panels
- Add metrics settings tab with enable/disable toggle
- Expose inventory, booking, occupancy, revenue, and guest metrics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 20:40:54 +01:00
parent b6d7eeb5ec
commit 13fd25f84c
8 changed files with 2805 additions and 8 deletions

20
PLAN.md
View File

@@ -180,15 +180,23 @@ This document outlines the implementation plan for the WP BnB Management plugin.
- [x] Guest statistics
- [x] Export functionality (CSV, PDF)
## Phase 9: Prometheus Metrics (v0.9.0)
## Phase 9: Prometheus Metrics (v0.9.0) - Complete
- [ ] Meanigful Metrics for this Plugin, see <https://src.bundespruefstelle.ch/magdev/wp-prometheus/raw/branch/main/README.md> for implementation details
- [ ] Example Grafana-Dashboard, see <https://src.bundespruefstelle.ch/magdev/wp-prometheus/raw/branch/main/README.md> for implementation details
- [ ] Update settings page to enable/disable metrics
- [x] Meaningful Metrics for this Plugin:
- Inventory: buildings, rooms by status, services by status
- Bookings: by status, check-ins/check-outs today, upcoming, avg duration
- Guests: total, by status, repeat guests, new this month
- Occupancy: current rate, monthly rate, occupied rooms, bed capacity
- Revenue: this month, YTD, average booking value, services revenue
- [x] Example Grafana Dashboard:
- Pre-configured dashboard JSON at `assets/grafana/wp-bnb-dashboard.json`
- Automatic registration with wp-prometheus
- 24 panels with gauges, pie charts, and stat displays
- [x] Update settings page to enable/disable metrics
## Phase 10: Security Audit (v0.10.0)
- [ ] Check for Wordpress best-practises
- [ ] Check for Wordpress best-practices
- [ ] Review the code for OWASP Top 10, including XSS, XSRF, SQLi and other critical threads
## Future Considerations (v1.0.0+)
@@ -308,6 +316,6 @@ The plugin will provide extensive hooks for customization:
| 0.6.0 | Frontend | Complete |
| 0.7.0 | CF7 Integration | Complete |
| 0.8.0 | Dashboard | Complete |
| 0.9.0 | Prometheus Metrics | TBD |
| 0.9.0 | Prometheus Metrics | Complete |
| 0.10.0 | Security Audit | TBD |
| 1.0.0 | Stable Release | TBD |