I was perusing code to improve my understanding before I launched my next effort in writing a plugin.
I saw an anomaly (not a bug) in calibre.ebooks.metadata.book in base.py circa lines 653..656 in the method format_field_extended.
Lines 653..654 appear to be redundant to lines 657..658.
Line 655 appears to be redundant to line 659.
Line 656 appears to be redundant to line 651.
If my analysis is right, then removing 653..656 will save nano-seconds per month by avoiding the duplicate call to fetch cmeta.