Sometimes unreal conditional sentences are mixed. This means that the time in the “if” clause is different than the time in the “result” clause. Have a look at the examples below.
Present result of a past condition
[If + Past Perfect] + [would + infinitive]
If we had tested the software properly, it wouldn’t have so many bugs.
If they hadn’t met at university, they wouldn’t be married now.
Past result of a present/general condition
[If + Past Simple] + [would have + past participle]
If I were better at Python, I would have programmed it myself.
If we didn’t have to work so much, we would have taken a day off yesterday.