Prevent rogue "undefined index" warnings when writing a log entry
Remove unnecessary $wpdb->prepare() call
Correctly show/hide Steps metabox based on achievement earning settings