Is this a code snippet or tutorial? Nope. It would probably be more appropriate in Off Topic.
Regarding the listed changes:
- This did not happen; there isn't even a loop in the entire plugin.
- This changes the behavior of the code (not arguing it made it worse).
- Not actually a true statement.
- While it reduced one small section of redundant code, it made it harder to understand.
- This is 100% untrue. The connected check is/was not part of the switch and it didn't change anything.
__________________