In this context, when you look at the code you are trying to learn how to use an unfamiliar API. So you can't verify that the code is using the API correctly or in the most efficient, organized, and secure manner, because you don't yet know everything the API offers.
For example, maybe the code sample has a section that formats and saves the result to a file using the standard library. From looking at that section, you have no way of knowing that the library offers a .saveToFile method that would have been better to use instead. Or if you search for "mysql" examples in PHP, you may find example usage of the hard-to-secure, deprecated mysql_real_escape_string function instead of the PDO library that is supposed to replace it.
For example, maybe the code sample has a section that formats and saves the result to a file using the standard library. From looking at that section, you have no way of knowing that the library offers a .saveToFile method that would have been better to use instead. Or if you search for "mysql" examples in PHP, you may find example usage of the hard-to-secure, deprecated mysql_real_escape_string function instead of the PDO library that is supposed to replace it.