Tag: Quality Assurance
-
Escaping the Unsecure
Part of my job at WordPress VIP is review. It takes up a lot of my time, and it’s critical work. Before code reaches our servers it needs to be vetted and peer reviewed to vouch that it’s fast, safe, and secure. Every developer makes mistakes ( even VIP developers ), so we peer review…
-
add_action considered harmful
I’m going to argue that add_action is actually a more elaborate version of goto hidden in plain sight, an anti-pattern, that it encourages unstructured programming, and obscures dependencies between code by providing the illusion of structured code, and encouraging spaghetti architecture. The Dangers of Goto Firstly what is a goto statement? goto (GOTO, GO TO or other case combinations,…
-
WP_Query::get_posts()
Every call to retrieve posts goes through WP_Query, and the bulk of the logic is in the method get_posts. Here’s some potentially useful information about the current state of what is arguably the most important function in WordPress. WP_Query::get_posts is 890 lines long, and has a cyclomatic complexity of 256. A good cyclomatic complexity is ~2-6,…