Ymese Developer Common Bugs

Motivation

This article will list down all the common bugs we met during the WordPress plugin development time.

Input validation and notification message

_ Required values

_ Special characters: /, \

_ Input that pass data to .htaccess

_ Min, max value

_ Uniform notification message and position (client side)

=> Solution: use the sample configuration for notification message and common validation library

_ Need to validate in both client and server side

WordPress issues

_ Hard-code table prefix: need to use global $wpdb; $wpdb->prefix

_ Style loading: unnecessary asserts loading

_ Should use “@unserialize” instead of use “unserialize”, it won’t throw exception

_ Need to pass Query Monitor tool metrics

_ Plugin conflicts:

  • Function naming conflict => need to add the plugin’s slug prefix
  • Library consolidation (AWS PHP SDK)