I'm a wordpress wordpress plugin developer. I saw the origin of numerous pluginsand many wordpress plugin use "classes" inside them plus some without classes.
Many huge coded plug ins like "wordpress-postratings" doesn't use Classes plus some small plug ins use Classes.
edit: Since classes have private, public and guarded access specifiers, personally i think an idea of security Will it increase security?
Apart from PHP does other languages require classes ?
Could it be compulsory to make use of Classes ?
I want a few recommendations.
No, it isn't compulsory, nor will it increase security per-se. it is simply a different style of programming.
Most developers would agree that object-oriented programming (classes) has numerous advantages over modular programming (functions). But that is much more of a spiritual believe that I'd rather not enter into :)
You need to find out about Object Oriented Programming. It's not compulsory to make use of classes but it will make code organization and upkeep of your code simpler.
It's clearly not really a technical requirement, but when the code structure of the wordpress plugin could be referred to in two or more classes, I'd say go OO. It does not have anything related to security however it will make your code cleaner and simpler to keep.
As Eric already stated, it isn't compulsory, nor will it increase security per-se.
One appealing factor, however, is it simplifies prefixing and reduces the chance of accidentally leading to a mistake from redeclaring a function.
I usually use OOP after i can.
Unless of course you've got a valid reason to not, I suggest always using classes. There's no real disadvantage to with them.
Using classes isn't mandatory it simply can help you along with other developer who'll modify your code to know it better.
For me you need to use classes whenever it's necessary.
You don't have to create code within an Object Oriented Fashion. You are able to write procedural code in PHP too. Many projects do, Drupal, should i be not mistaken is one.
In the finish during the day. Make use of the programming paradigm that's ideal towards the task at hands, may it be procedural, functional or OOP.