Testing & Troubleshooting WordPress Plugins and Themes

Speaker: Michael Novotny
Twitter: @mnovotny

Safeguards

  • jQuery & other default scripts that are included in wordpress
  • Conditionals – limit your scripts to only load on pages that are shown at that time, you’ll run into less script conflicts

Testing

  • Data – wptest.io importable library of tests for WordPress, imports a bunch of different content types into wordpress to test out multiple examples
  • Setup – adjust wordpress settings to show every process that’s running
  • Plugins
    • Debug Bar (base plugin)
    • Log deprecated Notices – log of what is now deprecated in different versions of wordpress
    • Theme-Check – runs through your blog and gives you warnings and alerts for things you should fix/change
    • Theme Mentor – above and beyond the Theme Checker plugin and makes sure that your plugin is not trying to deregister jquery, etc.
    • RTL Tester – puts your theme or plugin into the perspective of reading right to left (how the rest of the world works)
    • Slim Jetpack – jetpack without having to connect to wordpress.com to start using it. Assumes everything off, so you only turn on what you actually need.
    • Browser cache – when you’re tired of bashing your head against the wall.

Troubleshooting

  • Plugin vs. Theme vs. Core vs. Server/Configuration/PHP issue
  • Chrome Developer Tools
    • Launch Chrome Developer Tools
    • Right Click > Inspect Element
    • Access to live editable CSS, Source code, Console
  • Cross browser & device testing
    • Viewport Resizer – simulates actual sizes and devices.
    • Browser Stack – service for testing different OS, Browsers and devices