Sort:  

I think it would be best to separate the functionality of updating in-post links and the canonical link. For example, I want to update the canonical link on all my posts, but not sure I'm ready to update in-post links, since oftentimes I chose certain frontends for certain reasons when linking to things.

Would be good to have an option to do each of the actions.

I added parameters at the top of the script, which can be used to define the behavior of the script.

Good idea, I will make it optional.