Support » Developing with WordPress » How many lines of code A Single File should have?

  • Hi there

    I am new to wordpress plugin dev, and currently I am working on a custom plugin. Its a tool based plugin to and will allow user to perform different operations using that tool.

    Currently plugin’s function.php file has around 10K lines of code that offer around 200 different tools to its users.

    Now my question is should I continue working on the same function.php file or create a different plugin file for the same category of tools, i.e. a different plugin file for image editing tools, and a different plugin file for texting improving tool?

    Thanks.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You’re only limited by the maximum file size allowed by your server’s configuration. But for the sake of future maintenance you may choose to break up your code into logical parts and require or include the various parts as needed from functions.php. It’s more a matter of staying logically organized than any limitation of lines or file size.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.