# Repository Guidelines

## Project Structure & Module Organization
- `devsniper.php` is the plugin bootstrap and defines constants, includes, and initialization.
- `includes/` holds core PHP classes and helpers (for example, `class-devsniper-inspector.php` and `helpers.php`).
- `assets/` contains front-end/admin JS and CSS (`admin-search.js`, `inspector.css`).
- `languages/` contains translation templates (`devsniper.pot`).
- `uninstall.php` handles cleanup on uninstall; `SECURITY.md` documents security expectations.
- `stubs/wordpress.php` provides IDE stubs for WordPress APIs.

## Build, Test, and Development Commands
There is no build pipeline in this repository. Development is done by loading the plugin in a WordPress site and exercising the admin search and front-end inspector features.

Examples:
- Install locally at `wp-content/plugins/devsniper`, then activate in wp-admin.
- Optional PHP syntax check: `php -l devsniper.php`.

## Coding Style & Naming Conventions
- PHP follows WordPress-style spacing (spaces inside `if ( ... )`, 4-space indents). Keep `devsniper_` prefixes for functions/hooks and `DevSniper_*` for class names.
- Class files use the `class-devsniper-*.php` pattern and live in `includes/`.
- JS and CSS files are kebab-cased and live in `assets/` (for example, `admin-search.js`).

## Testing Guidelines
No automated test suite is present. Validate changes by:
- Verifying admin search (`Ctrl/Cmd + K`) in wp-admin.
- Verifying the inspector toggle (`Ctrl/Cmd + Shift + I`) on the front end.
- Confirming capability checks and nonces for any new AJAX actions.

## Commit & Pull Request Guidelines
Git history shows short, imperative messages without a strict convention (for example, “Update premium comparison table styles”). Keep commits concise and focused on a single change.

PRs should include:
- A clear description of behavior changes and any WordPress versions tested.
- Screenshots or screen recordings for UI changes.
- Notes on security-impacting changes (capabilities, nonces, sanitization).

## Security & Configuration Tips
- The plugin is designed to avoid external requests; keep assets local.
- Gate privileged features with capabilities and nonces, mirroring existing patterns in `includes/`.
