The possibilities of the theme are essentially limitless, because you can fully use PHP there. BUT! theme, as designed to display the content of the site in a certain way, not to add functionality to the site. Therefore, the capabilities of the topic are usually limited to those that are responsible for the appearance, and all the other features: voting, ratings, redirects, SEO, etc. are made to put in plugins …

Thus, the theme can:

Responsible for the output of site content for different types of devices: monitors and smartphones. Such themes are called adaptive. Also, themes can be fixed, one-column, two-column, and so on;
A theme can display any kind of content;
Can specify what content will be displayed for different users;
Can use any design elements (pictures, videos).

As with any website, the theme is not just a color scheme, layout and pretty pictures. A truly quality themes are also very functional. The functionality of the topic is in its flexible configuration. Ie it does not add anything new to the site, but fine-tuned to the taste of the owner. For example: the background image is set, change the colors of the elements, customizable menu and blocks with content (widgets).

How does the theme is different from the plugin?
In terms of code, you can say, nothing – you can create a full-fledged plugin in the theme. But in terms of logic – everything! The task of the plugin, add something new to the site, such as adding a poll. The task of the theme – the output of the content, including that poll…

So, the theme is responsible for displaying content on the page, and the plugin is needed to implement the functionality of the site.

Never add functionality to the theme itself, unless you have a good reason to do so. If you do, the functionality will be lost in place of the theme when you change it. For example, your theme has a cool photo gallery. And if you change the theme, that cool photo gallery will be lost…

So any functionality related to editing/adding site content should be designed as a plugin.