I tried copying and pasting the above code (the really long one, directly above this comment) into the file joomla2wp-mig.php but I get this error when I go to run it:
Parse error: syntax error, unexpected T_STRING in /home/johnstua/public_html/wpdir/wp-content/plugins/joomla-to-wordpress-migrator/joomla2wp-mig.php on line 1574