@newuser I suspect your problems are related to the W5100 and SD card rather than the RCSwitch code.
You could try commenting out the lines in loop() but I wouldn’t expect that to improve the situation.
For an ESP (WeMos) the lines of code I provided runs trouble free in a project with 3 full tabs of widgets.
There are quite a few W5100 threads on this site and one for example for you to perhaps take a look at is this one Arduino + w5100 ethernet shield error
I notice you have transmitter pin set as 10, isn’t that used by the W5100 as per the W5100 spec?