I begun to think about my progression with WordPress development as couple of major hops. It is not something I felt as it happened, but retrospective brought some clarity to it.

So what where the hops between? I came to define it as ages of WordPress code, both for timeline and progress aspects.

After some pondering I had come up with three.

Procedural age

Procedural (consisting of functions) code is old and fundamental layer of WordPress core. Commitment to backwards compatibility had kept it in focus and growing for many years.

It influenced WordPress extensibility with hooks system and theme development with Template Tags API.

I credit Template Tags API with much of WordPress success. It offers low learning curve and makes it trivial to start tinkering.

But procedural code encourages mere memorization and code reuse over actual development. It had spawned thousands of functions and endless plague of code snippets.

Procedural breakdown

Pro

easy to get started with

gets things done

Con

verbose

hard to document

technically shallow

Faux OOP age

Once you dig a little deeper there is a layer of class/object code in WordPress too. The nuance is — it is far from what would actually be considered object–oriented.

WordPress core (and code in general) tends to use classes as pseudo namespaces. The code is rife with god objects and permeated with global state/variables.

It is an incremental improvement over procedural ways. Yet the resulting blend of code is close to procedural and just short of more conventional OOP. It makes a challenging learning curve hike and falls short on delivering benefits.

Faux OOP breakdown

Pro

improvement in code organization

transition to development

Con

is not actual OOP

high code complexity

spike in learning curve

Modern age

In these circumstances the modern code can only happen in extension space.

It is driven by more freedom, more relevant workflows, influence of larger PHP ecosystem.

It happens as WordPress developers start to make sense of how larger PHP world works. Or PHP developers get involved with WordPress.

The two directions are quite distinct and rarely see it the same way. Diverging trends between and inside communities make it hard for dominant style to emerge.

That and lack of technical leadership from core creates a landscape of flavor–driven code. It is a relative improvement (again), and another major spike in learning curve.

Modern breakdown

Pro

real PHP and its ecosystem

access to modern practices and experience

Con

extreme fragmentation

disconnect from core development

Ecosystem impact

I had heard it said many times that “WordPress is a gateway drug to development”. I might have repeated it myself in the past.

I had come to believe that it is wrong statement. WordPress is a fantastic and empowering at initial involvement with coding and tinkering.

Learning curve goes up from there in inconvenient spikes and bubble of legacy code base. That works against progression towards serious development competence.

This doesn’t mean everyone has to be a developer. It fascinates me that small groups have leverage to empower many others with technology.

But there needs to be enough developers and I feel WordPress is falling short.

The amount of contributors to each release of WordPress core is in low hundreds. That is tiny number for the project that claims to power quarter of the web and aspires to power more than half.

At WordPress Stack Exchange the lack of expertise remains our main problem and challenge. At the moment top 135 users (0.25%) hold 30% of total reputation.

This imbalance created ecosystem of code, held together by duck tape and positive thoughts.

What is next?

I believe that future of WordPress code is in combination of its own power with that of PHP ecosystem.

It is important to take that blooming growth of modern PHP. It is important to keep that wonderful simplicity of involvement that WordPress offers.

Collaboration and finding that right blend, over competition and knee–jerks over right ways.

We need code that not only gets things done, but educates people and pushes them forward.

I aspire to find code like that, I aspire to write code like that. I hope to look back one year and see an age of code like that.

Related Posts