This repository code contains a simple PHP script which is run when a logged-in user posts a new blog entry. It checks the user has supplied the correct password, saves the new blog post, emails all users to notify them of the new post, then displays an HTML page with all blog posts, including the new one. The script makes use of supporting classes to do some of the work.
Read through the code and write in our application form any areas you would improve. Consider security, efficiency, coding style, scalability and future maintainability in your answer. Also if you spot any bugs, or potential sources of bugs in unexpected situations, make a note of them.
Give yourself 20-30 minutes to read through the code and make comments. We’re looking for three or four sentences per problem that identify the problem, what you would do to improve it and your reasoning. We’re not looking for essays or completely rewriting the implementation!
- You can assume that $logged_in_user has already been created as a valid user object elsewhere
- Some libraries, for example the Templater class, are deliberately omitted as they are not part of the test
- Don't make any other assumptions; if you're not sure something is worth commenting on, do so anyway!
Apply using our online application form https://natterbox.typeform.com/to/FkVL9L