Fix WP Unit Test failure and incorporate latest WPCS rules