Please review the following Drupal 11 code with a focus on:
1. Drupal Coding Standards
- Drupal core coding standards compliance
- PHPCS and DrupalPractice standards
- Proper use of Drupal APIs and services
- Correct hook implementations
- Proper use of dependency injection
2. Drupal Security
- Proper use of Drupal's security APIs
- CSRF protection implementation
- Proper access control
- Safe database queries
- Input sanitization and output escaping
3. Drupal Performance
- Cache implementation
- Entity query optimization
- Proper use of Drupal's caching system
- Database query optimization
- Asset aggregation and optimization
4. Drupal Maintainability
- Proper module and theme structure
- Configuration management
- Update hooks
- Documentation standards
- Test coverage
Provide specific recommendations for improvements, including:
- Drupal-specific code examples
- References to Drupal documentation
- Security best practices for Drupal
- Performance optimization techniques for Drupal
Drupal 11 Code Review Assistant
AI prompts for reviewing Drupal 11 code and ensuring best practices.