Checklist: code review for templates
This page is for reviewers of template and stylesheet changes, and for designers who want their change accepted at the first review. It follows the project's review list for admin templates and adds what applies to every design.
Contents
Correctness and safety
- To do: Every value from content, settings or the request is washed when printed (Wash and escaping).
- To do: URLs built with
ezurl/ezroot, design files withezimage/ezdesign; no hard-coded siteaccess paths. - To do: Optional fields tested with
has_contentbefore use. - To do:
{def}variables{undef}ined in included templates; no clash with the includer's names. - To do: Override rules: unique prefixed names, a correct
Match,Prioritywhere it matters (Override ordering). - To do: The template parses:
./console exp:eztemplatecheck <file or folder>.
Performance
- To do: Every list fetch has a limit; no fetch in a loop (Fetch performance).
- To do: Cache-block keys cover everything that changes the output, and nothing more.
- To do: Nothing user-specific in a view-cached template; no
csp_nonce()in cached output.
Styling
- To do: No
<style>and nostyle=""; no inline scripts or handlers (CSP-safe design). - To do: Shared classes reused (admin:
.a4-*components) before new CSS. - To do: Only tokens for colors, radius, spacing, fonts; a dark value for every new color token.
- To do: Module CSS in the right file (admin:
stylesheets/modules/<group>.cssor the extension's admin stylesheet). - To do: Logical properties instead of left and right.
- To do: Stylesheet changes deployed with the packer step; no
?v=queries.
Accessibility and languages
- To do: Every interface text through
i18nwith the right context, placeholders for variable parts. - To do: Headings in order; landmarks intact; buttons are buttons, links are links.
- To do: Images have alt text; icon-only controls have names.
- To do: Focus visible; keyboard works for anything interactive the change adds.
Evidence
- To do: Screenshots of the changed page in light and dark mode, at 1440 px and at 960 px with scale 2.
- To do: For admin designs:
php vendor/bin/phpunit --testsuite designpasses (The admin styling rules test). - To do: No console errors on the changed pages.
Related pages
- Checklist: theme launch
- Template style guide
- Common template mistakes
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.