Computing returns is one of the first things you learn when you start studying finance but I believe it's one the trickiest one once you get to complicated cases.
The source you mentioned seems actually very good to me and it already takes into account different approaches and different subtleties like dividend payment.
But this is in fact only the top of the iceberg, because there are many things that make computing returns of portfolios complicated. For example:
- Transaction costs which can happened at trade or portfolio level and which can be expressed as a percentage of flat fees.
- For funds, having investors buying or selling shares makes it more difficult for you to express your portfolio returns.
- You have might be very illiquid assets for which there are no bid (nobody wants to by it), what the price then?
- Many more examples I'm sure more experienced community members could be able to highlight.
For examples on how to compute portfolio returns on some these more advanced cases, I'd suggest you to look at the CFA Institute and their material. To be fair it might even be possible that the best book for this would not actually be finance book but some sort of accounting book.
Finally, note that computing returns is something that somehow depends on interpretation. There are many different ways to compute and present past performance and that has be used many times in the past to make products look better than they really are (or at least, has helped to hide some products' weaknesses). This is why some organization exist now to kind of audit the way performance is reported, such as GIPS.
To answer your questions:
- The source seems fine to me, although I didn't read it completely so if you have something specific you're worried about you can enhance your question.
- Better I'm not sure. But you can have a look at the CFA curriculum books.
- You need to take this into account to make sure your comparison "ending price vs initial prices" is apple-to-apple.
- This is performance attribution and it's a whole topic on its own.