Cool. Interesting project. I don't know much about PHP but I can give you some general feedback.
  • Following conventions is always good. It makes easier to others to understand and modify the code we write. BEM is something you can follow when writing styles.
  • Always write code that is pleasant to read. Avoid lines with more than 100 characters and use indentation and blank lines properly. Always follow the style guide of the language you are using.
  • Avoid magic numbers in your code. Use always constants with meaningful names. Same with strings.
  • Take into account the complexity of the functions/algorithms you write. Nested loops are too complex the most of the times. Take a look at Big O notation.
  • Do not store app configurations in code. Use environment variables. The twelve factor is a good methodology to follow when writing code for production.
  • Do not commit commented code.
  • Read quality code. Look for projects you find interesting and you think are high quality code and learn how their code is written.
I hope this help you. Also, keep an eye on the tech trends (frameworks, languages and tools), being up to date is a must.
Thanks. Do you know any procedural PHP codebases that I could read? (I am already familiar with the Wordpress codebase and have made some custom functions/plugins before.)
reply