Make plugin opts optional, add tests.