Using the following snippet, you will be able to test whether a plugin is active or not in WordPress.

Snippet Credit/Source: CatsWhoCode