Sonoff have release a new switch called the Sonoff mini which is much smaller than the familiar sonoff basic and more importantly supports DIY mode which lets you use the switch without the Internet
Here is a good video that also show you how to flash it to Tasmota firmware using OTA upgrade.
The shelly switch is an alternative to sonoff and it support MQTT without the need for flashing.
It is slightly more expensive that sonoff but much smaller.
Here is a good video that compare the shelly switch to the old Sonoff (not the mini).