Help me check the quality of a code

I come to this forum to ask for your help and your knowledge to help me review a code that I made in PHP and JavaScript. I need you to help me review the code, and help me find errors, since in my opinion it is well written.

Anyone interested in helping me with this task, write me a comment to send you the files.