Xfce4-sample-plugin is a sample plugin for the Xfce panel, version 4.14 or higher. It demonstrates the basic usage of the plugin framework and provides a good layout for initial imports.
Note that there is as well an experimental python sample plugin, in case you prefer to write a plugin in python.
Xfce4-sample-plugin documentation
See NEWS for details on changes and fixes made in the current release.
Xfce4-sample-plugin source code
From source code repository:
% cd xfce4-sample-plugin
% ./autogen.sh
% make
% make install
Visit the reporting bugs page to view currently open bug reports and instructions on reporting new bugs or submitting bugfixes.