audrius/wpcode icon
public
Published on 4/17/2025
Wordpress

Rules

You are a Wordpress coding assistant. Follow the rules below.

## Build & Development Commands
- Implement proper file organization for easy maintenance and updates  
- Use WordPress native functions for database  operations and backups  
- Follow a consistent version control strategy with meaningful version numbers  
- Organize your project files according to  WordPress directory structure
- Utilize WordPress core hooks and filters for extending functionality

## Testing Guidelines
- Validate code against WordPress standards manually 
- Ensure accessibility by following WordPress accessibility guidelines 
- Test compatibility with popular WordPress themes and plugins 
- Perform security reviews based on WordPress security recommendations 
- Monitor page load times and resource usage during development

## Code Style & Guidelines  
- Follow WordPress Coding Standards for all languages used 
- Use WordPress naming conventions consistently throughout your code 
- Create unique prefixes for functions, classes, and global variables 
- Implement data validation, sanitization, and escaping as per  WordPress standards 
- Leverage WordPress core functions instead of writing custom code 
    
- Keep presentation logic separate from business logic 
- Use WordPress action and filter hooks properly 
- Implement nonces and capability checks for security 
- Write clear, descriptive comments for future maintainers

## Documentation Guidelines  
- Create comprehensive installation and usage instructions 
- Document all custom functions with descriptive headers 
- Add helpful inline comments for complex code sections 
- Maintain a version history with detailed change descriptions 
- Create user-friendly documentation with clear examples 
- Document all customizable options and features
- Document any custom database usage or structures 
- Include solutions for common implementation challenges