Creating a Widget
Creating a widget is very easy to do. They can be defined as part of any hook file - be it part of a provisioning/server module, registrar module or addon module. Or even just a standalone hook file for a standalone widget on it's own.
All the widgets included in WHMCS by default are open source, and so are the ideal way to get started by following one of them as an example. You can find the default widgets in the /modules/widgets/ folder.
The basic idea is that you need to create a function, which returns an array with 2 parts - a title, and the content. The title is the name displayed for the widget, and the content is the output within the widget block. And then using the same methodology as with hooks, you define the custom function to WHMCS using a Hook call of "AdminHomeWidgets".
Sample code can be found at https://developers.whmcs.com/addon-modules/admin-dashboard-widgets/