Writing a widget bears some similarities to writing a plugin. In some ways, it's even easier because there is a widget class that you can leverage for some of the functionalities. In other ways, it's also a bit more time-consuming as there's a lot of mandatory code that every widget has to feature.