The code used in the Load Testing Power BI Applications with Visual Studio Load Test presentation is available for download here. It is solely sample code, but hopefully it will help you with the start of building robust plugins.
If you have any questions about building a more complete and dynamic recorder plugin, you can reach out to me via email or through this form.