Honestly, a terrific way to learn more about coding plugins for WordPress is by plowing through hundreds of existing plugins that offer to do something similar to your project idea. Once you find a good plugin author, you know where to get quality stuff. In general, if the plugin throws errors or notices and is a mess to read, then it's likely not worth copying.
This is one of the beautiful aspects of an open source project. If you need to find inspiration from existing code in another plugin, seek the cleanest and best code available.