Bootcamp II is a wordpress theme (as well as an inside joke) designed to suit the needs of foothillschurch.com. It makes use of webpack, Babel, Sass, Tailwind, Browsersync, PostCSS, ESLint, Stylelint, Prettier and more. It is meant for that site, but if you can use it by all means go for it.
This is a very minor example that won't really make a noticeable difference. However, it's a good practice to get into because other situations could cause performance impacts.
You're declaring the $size_select variable in each iteration of the loop, but the variable is exactly the same in each iteration. If this variable used something from in the loop, like the post for example, then it would need to be in the loop. But, this variable doesn't care about the loop data, it's just a static variable that's the same each time. Because of this, it is more optimal to declare the variable once, outside of the loop, and then you can use it as needed.
This is a very minor example that won't really make a noticeable difference. However, it's a good practice to get into because other situations could cause performance impacts.
https://github.com/Myzwer/foothillschurch/blob/effc5bbf81497ae99f0561ab7849412fe9272bfd/components/blocks/event-type.php#L80-L84
You're declaring the
$size_select
variable in each iteration of the loop, but the variable is exactly the same in each iteration. If this variable used something from in the loop, like the post for example, then it would need to be in the loop. But, this variable doesn't care about the loop data, it's just a static variable that's the same each time. Because of this, it is more optimal to declare the variable once, outside of the loop, and then you can use it as needed.