Skip to content

0.1.2: fix WordPress.org review issues - #5

Merged
deflinhec merged 1 commit into
mainfrom
claude/project-thread-ssefcx
Nov 2, 2026
Merged

deflinhec merged 1 commit into
mainfrom
claude/project-thread-ssefcx

Conversation

@deflinhec

Copy link
Copy Markdown
Member

Requested by Danny · project thread

Fixes the first-round WordPress.org Plugins Team review (slug hibira), plus issues the deeper second round usually raises.

Review items

  • Translation files included: the plugin zip no longer ships .po/.mo. languages/hibira.pot stays; the .po files move to translations/ (export-ignored) so they can be imported into translate.wordpress.org after approval. tools/compile-mo.py removed.
  • load_plugin_textdomain(): removed (plugin requires WP 6.0).

Ahead of the second round

  • REST /hibira/v1/auth: the per-channel decision now runs in permission_callback (instead of __return_true), socket_id/channel_name are validated, order_key/visitor sanitized.
  • Settings: secret goes through sanitize_text_field, host is reduced to a hostname (a pasted URL keeps its host).
  • $_GET['key'] uses sanitize_text_field; live comment HTML passes wp_kses_post before it is sent.
  • hibira_readers() moved to functions.php (functions and classes in separate files).
  • readme: source link for the bundled minified pusher-js 8.6.0 (identical to npm dist/web/pusher.min.js minus the source map comment, which pointed at a missing file).
  • phpcs.xml.dist (WordPress-Extra + PHPCompatibilityWP) and a phpcs CI job.
  • Version 0.1.2, changelog, regenerated .pot.

Testing

  • Plugin Check (incl. experimental): no errors. PHPCS WordPress-Extra: clean. php tests/run.php: 21 passed.
  • Clean WordPress 7.1.4 + WooCommerce, WP_DEBUG on, against a mock Hibira API: post page enqueue, presence/private auth (allowed, 403 for admin channel / draft post / wrong order key, 400 for bad socket ID), comment pending + approved events, post-updated event, settings save, test event (nonce checked), order status + new order events, guest order-received page, uninstall removes the option. No PHP notices from the plugin.

Generated by Claude Code

…en the auth endpoint

- Remove load_plugin_textdomain(): WordPress loads translations for the
  hibira slug itself since 4.6, and the plugin requires 6.0.
- Stop shipping .po/.mo files; translate.wordpress.org provides them. The
  .po files move to translations/ (export-ignored) for importing there.
- REST /hibira/v1/auth: decide the channel in permission_callback, validate
  socket_id and channel_name, sanitize order_key and visitor.
- Sanitize the secret and host settings, the order key from $_GET and live
  comment HTML (wp_kses_post).
- Add phpcs.xml.dist (WordPress-Extra, PHPCompatibilityWP) and a CI job.
- readme: source of the bundled pusher-js build. Version 0.1.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SHtsCDXecYDWvMV2LaCkYm
@deflinhec deflinhec self-assigned this Nov 2, 2026
@deflinhec
deflinhec marked this pull request as ready for review November 2, 2026 15:32
@deflinhec
deflinhec merged commit 3d43ca2 into main Nov 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants