It depends what you mean by 'plugin' that 'interacts with your application'. When you say plugin, one might think something that is going to run on the JVM itself as part of your program. In that case I don't know why you mentioned something like PHP, which is primarily designed for HTTP (although some people have other creative uses of it.)
Java comes with an out of the box implementation of a Javascript Engine (Java 8 comes with the Nashhorn Javascript engine). So that might be the most natural way to go if you want to have a non-compiled script-like kind of interface, although it depends what kind of functionality you want to provide.
Another alternative is to use Groovy. You can find a few example applications that use this approach. For example, SoapUI, a popular web service testing tool, provides Groovy and Javascript support for users to write their own test scripts and extensions.
However, once again, it depends what kind of functionality you have in mind.