I actually use free online development environments to test, such as c9. It allows very quick installation and setup of wordpress. You can easily try different plugins/codes without endangering your files.
Moreover, if you mess any thing up you can always delete that installation and create a new one.
Another great feature is the cloning of the environment. So if you are about to work on something dangerous. You can clone your environment prior to it and work freely on the new plugins/themes you are working on.
It provides a very nice text editor with similar functions to sublime and great test environment. You can use command line just like any normal server. The only thing to keep in mind is that it is only a development environment. It does not support Production.
Besides wordpress, it also provides other dev environment for many other languages.
Additional Tip: I keep a separate Wordpress installation in c9 with the unit test data imported. Follow here for more instructions and the benefit for having test data.
This allows me to quickly test someone's code or a new plugin without having to mess with my actual project.
This is especially beneficial for stack members.
As of July 14, 2016, Cloud9 is part of Amazon AWS. you can read the announcement of the c9's acquisition by AWS here.
Some of the benefits listed on the official AWS Cloud9 are:
CODE WITH JUST A BROWSER
AWS Cloud9 gives you the flexibility to run your development environment on a managed Amazon EC2 instance or any existing Linux server that supports SSH
CODE TOGETHER IN REAL TIME
AWS Cloud9 makes collaborating on code easy. You can share your development environment with your team in just a few clicks and pair program together. While collaborating, your team members can see each other type in real time, and instantly chat with one another from within the IDE.
BUILD SERVERLESS APPLICATIONS WITH EASE
AWS Cloud9 makes it easy to write, run, and debug serverless application
DIRECT TERMINAL ACCESS TO AWS
AWS Cloud9 comes with a terminal that includes sudo privileges to the managed Amazon EC2 instance that is hosting your development environment and a preauthenticated AWS Command Line Interface.
START NEW PROJECTS QUICKLY