I don't work in software, but my work in hardware has taught me a few common ideas that are almost useful.
1)Read + lead the industry. If there is growing demand for X programming language + Y software, master X + Y and try to stay with the demand. To stay above the water, you must* be willing to adapt to the times.
1a) Some skills are eternally in demand, pay well, and tend to have long term contracts. There is usually a catch with these. If you can find and master one of these, you'll be in pretty good shape.
2) What you specialize in significantly affects what you will be paid. Since you mentioned Wordpress plugins, I'm going to use that as an example. Wordpress plugins are great and all, but (a majority of) Wordpress' user base isn't exactly the most technically competent group. Due to this, they will likely underestimate the work that needs to be done, likely underpay, and likely have unrealistic demands. Basically, if and when you specialize, just keep who would be asking for your work in mind.
3) It's not what you know; it's who you know. (And to get people to be willing to recommend you, you need to know how to do something well. It's a paradox.)
"Look real close cause strobe lights lie" -Anonymous