Yes, here is the corrected and cleaned-up version of your code. I have resolved the fatal argument errors, fixed the JavaScript syntax, correctly enqueued your inline scripts so they actually load, and set up a constant for your secret key so the JWT signatures work securely. The Fixed Code Replace your current plugin code with this: PHP