I'm sure Graechan can give a definitive answer as to where that code comes from, but in this context it's garbage and shouldn't be there.
To me it looks like either old code that's no longer used, or work-in-progress that wasn't finished. It's most of the code to register a script in the menus, but lacking a script-fu-register at the start. Which means it was trying to run a procedure called "the-picture-frame-highlights" which doesn't exist hence an illegal function.
See earlier in the file at (script-fu-register "script-fu-picture-frame"...), which you can compare to the dialog box that comes up when you run the script, and see where all the parts are defined.
Kevin
ps. Beware, You've shown interest, I'll get you writing scripts next

and

by both Drac and Molly
