Migrating custom php we wrote from functions.php into a site-specific plugin

The comments others have left seemed to suggest the process of converting from functions.php to a site specific plugin truly should be straightforward. And so I attempted again, and this time around everything worked. I think I may have had a wrong syntax somewhere that got corrected during the second attempt, when i pasted the code from functions.php fresh.

In short, false alarm. But a big thank you for all the commenters, as without their line of questions I would have given up on this.