(I think I'm going to open a can of worms with this answer but I've done some research so, don't blame me.)
In the student's text book, New English File Upper-Intermediate Oxford University press
Page 138 it says:
The opposite of "must have" is "can't have" NOT "mustn't have"
So for some it is considered standard English to use: can't have or couldn't have instead of mustn't have when you are speculating or guessing about the past in questions and negative sentences.
He couldn't have been hungry
means practically the same as
He can't have been hungry
They both express a strong conviction in the past, the speaker can choose to add further information in order to back up his claim.
A: John didn't eat his cereal this morning.
B: He can't/couldn't have been hungry. He usually has breakfast.
Thus the speaker is saying it's impossible that John was hungry because he knows John never leaves home without eating something. Must not (mustn't) means something quite different, you are forbidding someone or something from performing an action now, in the present and it is not used for speculating in the past.
On p394 in Practical English Usage by Michael Swan:
Must is used with the perfect infinitive for deductions about the past.
- "The lights have gone out" -- "A fuse must have blown."
- "We went to Majorca." -- "That must have been nice."
Must is only used in this way in affirmative sentences. In questions and negatives, we use can and can't instead.
This is also confirmed by A Practical English Grammar by A.J.Thomson A.V. Martinet 4th edition on page 148.
Let's compare your examples:
The party was great, couldn't have been better!
This expresses an extreme. Since the party couldn't have been better, it's as good as it could possibly be. That makes this a fairly strong statement! It's even stronger than the party was great, so it works as a bit of superlative emphasis.
The cake was too small. It could have been bigger!
This doesn't express an extreme. The range of possibilities is anywhere from a little bigger to a lot bigger. As a result, this statement is fairly weak. It doesn't strengthen the statement made by the cake was too small at all. As it is, the second half of the sentence should be removed.
If you want to make a strong statement about the cake using this construction, you need to come up with a negative extreme that you want to express. (It doesn't have to be literally true; it can be hyperbole.) For example:
The cake was too small. It couldn't have been smaller!
This is a little better, though it sounds a little silly. (It's not the world's finest example of hyperbole.) You could make a more general statement about its quality:
The cake was too small. It couldn't have been worse!
This is a bit less silly.
By the way, I'd like to recommend Daniel's answer, in particular for his description of "could have been better", a phrase which is intentionally weak.
Best Answer
I have answered a similar question of yours here: He mustn't/couldn't have been
To answer succinctly your question, you can use can't have and couldn't have indifferently.
I know that online there are websites that infer can't have = 99% certainty, whereas mustn't have (which is non-standard English)= 95% can't have vs.couldn't have But how do you measure 99%? And why is mustn't fixed at 95%?
When speaking, listeners will understand how certain you are by your facial expressions and voice intonation. Some will argue that using couldn't tentatively increases uncertainty. I think this is subjective, there is no fixed rule. Use whichever you're most comfortable with, and that includes mustn't have
If however, you are planning to sit an exam in the future, choose between can't have or couldn't have in your writing. Every time.