Appearance
Code Review Checklist
Use this checklist when reviewing code in LamaPress projects. This ensures consistency, quality, and adherence to standards.
Table of Contents
- General Checklist
- PHP Checklist
- JavaScript Checklist
- Component Checklist
- ACF Checklist
- Styling Checklist
- Security Checklist
- Performance Checklist
General Checklist
Code Quality
- [ ] Code follows naming conventions
- [ ] Functions and variables have descriptive names
- [ ] No magic numbers or hardcoded values
- [ ] Code is DRY (Don't Repeat Yourself)
- [ ] Functions are small and focused
- [ ] Comments explain "why", not "what"
- [ ] No commented-out code
- [ ] No debugging code left in
File Organization
- [ ] Files are in correct directories
- [ ] File names follow conventions
- [ ] No duplicate code across files
- [ ] Related code is grouped together
Documentation
- [ ] DocBlocks are present for functions
- [ ] Complex logic is commented
- [ ] README updated if needed
- [ ] Changelog updated if needed
PHP Checklist
Naming
- [ ] Functions use
camelCasewithllprefix - [ ] Variables use
camelCase - [ ] Classes use
PascalCase - [ ] Constants use
UPPER_SNAKE_CASE - [ ] Keys use
snake_case
Code Style
- [ ] Opening brackets on new line
- [ ] Uses
<?= ?>shorthand for echo - [ ] Proper spacing and indentation
- [ ] No more than one empty line
- [ ] Content within HTML on new line
WordPress Standards
- [ ] Uses WordPress core functions
- [ ] Follows WordPress coding standards
- [ ] Uses WordPress APIs correctly
- [ ] Proper use of hooks and filters
Security
- [ ] Input is sanitized
- [ ] Output is escaped
- [ ] Nonces verified for forms
- [ ] Database queries use prepared statements
- [ ] No direct database queries
- [ ] User capabilities checked
Error Handling
- [ ] Try-catch blocks for expected exceptions
- [ ] Proper error logging
- [ ] Graceful error handling
- [ ] No PHP errors or warnings
JavaScript Checklist
Naming
- [ ] Variables use
camelCase - [ ] Functions use
camelCase - [ ] Classes use
PascalCase - [ ] Constants use
UPPER_SNAKE_CASE
Code Style
- [ ] Uses ES6+ syntax
- [ ] Arrow functions for component methods
- [ ] Template literals for strings
- [ ] Destructuring where appropriate
- [ ] Consistent formatting
Component Structure
- [ ] Exports default class
- [ ] Implements standard methods:
- [ ]
constructor() - [ ]
init() - [ ]
bindEvents() - [ ]
enter()(if needed) - [ ]
destroy()
- [ ]
- [ ] Uses path aliases for imports
- [ ] Imports ordered correctly
Event Handling
- [ ] Events in
bindEvents()method - [ ] Events cleaned up in
destroy() - [ ] Proper event delegation if needed
- [ ] No memory leaks
Animation
- [ ] Timelines bound to instance
- [ ] Uses
killTimeline()helper - [ ] ScrollTriggers cleaned up
- [ ] No orphaned animations
Component Checklist
Structure
- [ ] Component files in correct location
- [ ] Required files present (
index.php) - [ ] Optional files only when needed
- [ ] File names follow conventions
PHP Template
- [ ] Proper file header with DocBlock
- [ ]
defined('ABSPATH') || exit;check - [ ] Section variables initialized (sections only)
- [ ] Uses
llSectionHeader()andllSectionFooter()(sections) - [ ] Properties checked with
?? - [ ] Data validated before use
- [ ] Output properly escaped
JavaScript
- [ ]
data-componentattribute present - [ ] JavaScript file exports default class
- [ ] Component initializes correctly
- [ ] No console errors
- [ ] Proper cleanup in
destroy()
ACF Fields
- [ ] Required variables defined (sections)
- [ ] Unique 12-character key (sections)
- [ ] Field keys prefixed correctly
- [ ] Instructions added to fields
- [ ] Fields properly organized
ACF Checklist
Field Definitions
- [ ] Unique field keys
- [ ] Descriptive field names
- [ ] Proper field types
- [ ] Instructions provided
- [ ] Default values where appropriate
- [ ] Conditional logic if needed
Field Access
- [ ] Uses
llField()with all arguments - [ ] Fields checked before use
- [ ] Proper null handling
- [ ] No direct
get_field()calls whenllField()should be used
Field Organization
- [ ] Fields logically grouped
- [ ] Related fields together
- [ ] Reusable fields in blocks/parts
- [ ] Global fields in
config/fields/
Styling Checklist
Tailwind Usage
- [ ] Uses Tailwind classes when possible
- [ ] Custom classes only when necessary
- [ ] Classes prefixed with
ll- - [ ] Responsive classes used correctly
- [ ] Mobile-first approach
Custom Styles
- [ ] SCSS only when Tailwind insufficient
- [ ] Uses
@applyfor Tailwind patterns - [ ] BEM-like naming with
ll-prefix - [ ] Styles are component-specific
- [ ] No global style pollution
Design System
- [ ] Uses design system classes
- [ ] Typography classes used
- [ ] Color system used
- [ ] Grid system used
- [ ] Spacing system used
Security Checklist
Input Validation
- [ ] All input sanitized
- [ ] Proper sanitization functions used
- [ ] Validation before processing
- [ ] Type checking where needed
Output Escaping
- [ ] All output escaped
- [ ] Proper escaping functions:
- [ ]
esc_html()for text - [ ]
wp_kses_post()for HTML - [ ]
esc_url()for URLs - [ ]
esc_attr()for attributes
- [ ]
Authentication
- [ ] User capabilities checked
- [ ] Nonces verified
- [ ] CSRF protection
- [ ] Proper authorization
Database
- [ ] Prepared statements used
- [ ] No SQL injection risks
- [ ] Proper escaping
- [ ] Uses WordPress database APIs
Performance Checklist
Code Efficiency
- [ ] Efficient queries
- [ ] Minimal database calls
- [ ] Caching where appropriate
- [ ] No N+1 queries
- [ ] Proper use of
llFields()for multiple fields
Asset Optimization
- [ ] Images optimized
- [ ] Proper image sizes used
- [ ] Lazy loading implemented
- [ ] Assets properly minified
- [ ] Code splitting used
JavaScript
- [ ] No memory leaks
- [ ] Event listeners cleaned up
- [ ] Timelines killed properly
- [ ] Efficient animations
- [ ] No unnecessary re-renders
Accessibility Checklist
HTML
- [ ] Semantic HTML used
- [ ] Proper heading hierarchy
- [ ] Alt text for images
- [ ] Labels for form elements
- [ ] ARIA attributes where needed
Keyboard Navigation
- [ ] All interactive elements keyboard accessible
- [ ] Focus states visible
- [ ] Tab order logical
- [ ] No keyboard traps
Screen Readers
- [ ] ARIA labels provided
- [ ] ARIA roles used correctly
- [ ] Live regions for dynamic content
- [ ] Proper announcements
SEO Checklist
Meta Tags
- [ ] Title tags unique and descriptive
- [ ] Meta descriptions present
- [ ] Open Graph tags (if needed)
- [ ] Twitter Card tags (if needed)
Content
- [ ] Proper heading structure
- [ ] Descriptive alt text
- [ ] Semantic HTML
- [ ] Internal linking
Technical
- [ ] Canonical URLs
- [ ] Schema markup (if needed)
- [ ] Mobile-friendly
- [ ] Fast loading
Review Process
Before Submitting
- Run through this checklist
- Test functionality
- Check for errors
- Verify in different browsers
- Test responsive design
During Review
- Check code quality
- Verify standards compliance
- Test functionality
- Check security
- Verify performance
After Review
- Address feedback
- Make necessary changes
- Re-test functionality
- Update documentation if needed
Related Documentation
- Coding Standards - Standards reference
- Component Guidelines - Component standards
- Naming Conventions - Naming rules
Next Steps:
- Review Coding Standards before coding
- Check Component Guidelines for components
- See Troubleshooting if issues found