Adobe restricts to run UXP scripts from UXP plugins. Check out this thread: Panel with buttons to run psjs files