rl-warmup-plugin/CLAUDE.md
2025-03-07 01:51:13 -06:00

1 KiB

RL MailWarmer WordPress Plugin Guide

Build/Test Commands

  • Run PHPUnit Tests: vendor/bin/phpunit tests
  • Run Single Test: vendor/bin/phpunit tests/TestName.php
  • Composer Update: composer update
  • Composer Install: composer install

Code Style Guidelines

  • Class Naming: Use RL_MailWarmer_ClassName format with underscores
  • Method Naming: Use snake_case for method names
  • File Naming: Use class-rl-mailwarmer-name.php for class files
  • Database: Use rl_mailwarmer_ prefix for all tables
  • Error Handling: Use WP_Error for WordPress-specific errors, Exceptions for PHP-level errors
  • Validation: Always validate and sanitize inputs using WordPress functions
  • Documentation: Use PHPDoc blocks for classes and methods
  • Security: Follow WordPress security best practices (prepare SQL, validate nonces)
  • Imports: Place includes at the top, use require_once for class dependencies
  • Type Hints: Use PHP type hints for method parameters and return types