A presentation at WordCamp Nordic in March 2019 in Helsinki, Finland by Andrey Savchenko
Lessons from WordPress core on how to (not) write code
2 You can’t afford WordPress code
3 WordPress core development 1. technical debt → popularity 2. popularity → volunteers 3. volunteers → technical debt
4 WordPress in StackOverflow survey — 6th Most Dreaded Platform (2018) — 3rd Most Dreaded Platform (2017) — 2nd Most Dreaded Technology (2016) — 3rd Most Dreaded Technology (2015)
5 Not “is it good?” but “what is good?”
7 Best APIs 1. Custom Post Types (74% positive) 2. Plugin (hooks) (75%) 3. Custom Taxonomies (70%) 4. Queue (CSS and JS) (70%) 5. Options and Transients (57%)
8 Best APIs — commonalities — laconic — procedural — flexible — public
9 Worst APIs 1. Rewrite (59% negative) 2. XML–RPC (61%) 3. List Tables (53%) 4. Editor (48%) 5. Filesystem (47%)
10 Worst APIs — commonalities — verbose — persistent — clunky — semi–private
11 WordPress is a story not a blueprint
12 Be WordPress–good, not WordPress–bad — make great APIs — hold on to your wins — part with your failures — love users and developers — write reliable flexible code
13 Andrey “Rarst” Savchenko — Rarst.net — WordPress contractor — Date/Time core component maintainer Rarst.net/slides/core-lessons