To set the title and description, before the line $dw->save(); add this:
PHP:
$dw->setExtraData(XenForo_DataWriter_UserField::DATA_TITLE, 'This is the title of the user field');
$dw->setExtraData(XenForo_DataWriter_UserField::DATA_DESCRIPTION, 'This is the description of the user field');
That automatically creates the phrases with the defined text.