- obviously I can see you have a TODO about localising strings
- You're checking for fields that exist in the database but not the schema, but not whole tables that exist in the database but not the schema. Perhaps you need to something similar to this:
foreach($dbfields as $fieldname=>$info)
$errors[$tablename] = 'Field ' . $fieldname . ' is unexpected.'
but for tables.
Other than that, it looks good to me.