It would perhaps be useful when importing a script to be warned if the script contains custom functions and to be asked if one would like to import the custom functions with the script. This assumes checking that the dependant custom functions are not already installed. Preferably I would like to be warned about any custom functions used by the imported script, even if they are already installed, asked if I would like to use the existing custom function in the target file or have the custom function from the script's source file imported and re-named if necessary and have the script use the re-named imported custom function.
This would be nicer than importing a script, checking for errors, following up, deleting the imported script(s), reading through the original scripts, noting any custom functions - which hopefully are noted under Dependencies: in the comments - importing the custom functions and them importing the scripts again. Check errors and repeat.