Skip to content

chore: address admin view coding standards#10

Merged
rbcorrales merged 8 commits into
mainfrom
chore/admin-view-standards
May 26, 2026
Merged

chore: address admin view coding standards#10
rbcorrales merged 8 commits into
mainfrom
chore/admin-view-standards

Conversation

@rbcorrales
Copy link
Copy Markdown
Member

Summary

  1. Tightens escaping, sanitization, and nonce handling in admin views.
  2. Reduces avoidable PHPCS suppressions while keeping scoped database query suppressions where the admin diagnostics intentionally read custom tables.
  3. Aligns status view markup and script indentation.

Testing

  1. vendor/bin/phpcs --standard=phpcs.xml.dist admin/views --report=summary
  2. php -l admin/views/status.php
  3. git diff --check

rbcorrales and others added 2 commits May 25, 2026 18:48
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on bringing WPVDB admin view templates closer to WordPress coding standards by tightening output escaping/sanitization and improving nonce handling for admin actions, while also cleaning up markup/indentation.

Changes:

  • Improved sanitization/unslashing of $_GET inputs across admin views and tightened escaping for URLs/JS strings in the status UI.
  • Refined admin status diagnostics UX (nonce-protected “Run Diagnostics” flow; safer rendering of AJAX-derived strings in the test embedding UI).
  • Coding-standards cleanups: strict in_array, use of selected()/checked(), translator comments, and markup alignment/indentation updates.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
admin/views/status.php Hardens admin status/tools UI (nonce verification, escaping, stricter comparisons) and aligns markup/JS output handling.
admin/views/settings.php Sanitizes section/settings-updated query params and replaces manual checkbox handling with core helpers.
admin/views/incompatible-db-warning.php Improves i18n/escaping and makes step rendering safer via esc_html / wp_kses_post.
admin/views/incompatible-db-notice.php Switches admin notice strings to escaped i18n helpers and adds translator context.
admin/views/header.php Tightens table existence checks and standardizes pagination variable naming/usage in the header logic.
admin/views/embeddings.php Improves escaping, i18n, PHPCS scoping, and pagination output sanitization.
admin/views/automattic-connect.php Simplifies and hardens handling of settings-updated query param with proper unslashing/sanitization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread admin/views/status.php Outdated
Comment thread admin/views/header.php Outdated
Comment thread admin/views/status.php Outdated
rbcorrales and others added 3 commits May 25, 2026 19:07
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread admin/views/status.php
Comment thread admin/views/status.php
Comment thread admin/views/status.php
rbcorrales and others added 2 commits May 25, 2026 20:01
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread admin/views/status.php Outdated
Co-Authored-By: Codex <codex@openai.com>
@rbcorrales rbcorrales merged commit a74bd0b into main May 26, 2026
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