Is there an **easy to understand scheme** to decide what kind of code belongs to a plugin or the theme’s `functions.php`?

There [are](https://wordpress.stackexchange.com/search?q=%22without%20plugin%22) [many](https://wordpress.stackexchange.com/search?q=%22without%20a%20plugin%22) [cases](https://wordpress.stackexchange.com/search?q=%22without%20using%20a%20plugin%22) and many [debates](https://wordpress.meta.stackexchange.com/questions/1288/questions-specifically-asking-for-a-solution-without-a-plugin) about that topic, mostly because there are some misconceptions about the inner workings of WordPress. I am asking for an answer based on facts, not on opinions.

It should explain how to handle these points (and probably more):

* custom post types and taxonomies
* contact forms
* shortcodes
* custom widgets
* [`add_theme_support( 'automatic-feed-links' );`](https://codex.wordpress.org/Automatic_Feed_Links)
* SEO functions like custom `meta` elements
* theme switch

There are often pros and cons for both sides. Our most popular question [Best Collection of Code for your functions.php file](https://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file) got a lot of code snippets as answers that are at least debatable.  

We need criteria a beginner can understand, maybe a check list – with reasons.

See also the related question by Chip Bennett on our meta site: [Questions specifically asking for a solution "without a plugin"](https://wordpress.meta.stackexchange.com/questions/1288/questions-specifically-asking-for-a-solution-without-a-plugin)

Related: [Where do I put the code snippets I found here or somewhere else on the web?](https://wordpress.stackexchange.com/questions/72160/where-do-i-put-the-code-snippets-i-found-here-or-somewhere-else-on-the-web)