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, with a maximum of 10.
WP_Query::get_posts has an NPath complexity of 1.43573394139742×10^48. This can also be expressed as:
Or 1.435 Quindecillion. This is 25 orders of magnitude greater than the number of stars in the visible universe. It is also the number of unit tests required to fully test
Should unit tests be written for
WP_Query::get_posts, averaging 1.5kb each, and these tests are stored on 1TB Samsung Hard drives weighing 0.4kg each, the resulting storage would weigh a little more than 4 solar masses, or 80 Undecillion KG. For comparison, the smallest stellar black hole known is XTE J1650-500, weighing in at 3.8 solar masses