I’m just getting started learning about the WordPress Core. WordPress’s codebase is the first large codebase that I’ve looked thoroughly into.
The get_posts method in wp-includes/query.php is 1300 lines long. To me that is huge. Can I expect a lot more of these large functions in the codebase?
Yes.
To give you some historical perspective WordPress core:
- is relatively old code base, code volume tends to grow over time;
- has extreme commitment to backwards compatibility, as result it’s extremely rare for code to be removed from core;
- is written in essentially obsolete dialect of PHP version 5.2 (which it remains compatible with), which resulted in monolithic core design and low separation between modules;
- largely ignores code length and complexity metrics for the purposes of development and maintenance.
You don’t make it completely clear if you are interested in PHP development in general or WordPress specifically. If you want some experience with modern PHP development style you should probably look at different projects, done in more current styles.