Web . Write . WP.

Code Sleuthin’

Did some sleuthin’ and now I have a way to learn, by reverse-engineering the changes other developers make to fix PHP notices and warnings in their WordPress plugins. For simplicity, I’ll list the steps.

  • Used the Debug Bar plugin to spot active notices/warnings.
  • Read through them to find one that was stemming from a specific plugin.
  • Went to that plugin’s page on the WordPress.org Plugin Repo.
  • Checked the changelog to find the version where the warning was fixed.
  • Check which version of the plugin I have installed on my site.
  • Clicked on the plugin author’s Github repo link.
  • Clicked on ‘Releases’ and selected the version where the warning was fixed.
  • Clicked on ‘Compare’ and selected the version where the PHP notice was last seen, to compare it with the fixed version.
  • Click on the ‘File changes’ tab to see exact code differences.
  • Saw the exact code changed – what was removed shows in red, and what was added shows in green.

This is helpful, as I continue to navigate the codebase and learn how real-world developers handle issues.

Code sleuthin’.. nice..

Fediverse reactions

Discover more from jmtm

Subscribe to get the latest posts sent to your email.