Bond order is defined as one half of the difference between the number of electrons present in the bonding and anti-bonding orbitals of a molecule.
Bond order = 1/2(Nb - Na)
Bond order of N2

Number of bonding electrons, Nb = 10
Number of anti-bonding electrons, Na = 4
Bond order of nitrogen molecule = 1/2(10 - 4) = 3
Bond order of O2

Bond order = 1/2(Nb - Na) = 1/2(8 - 4) = 2
Hence, the bond order of oxygen molecule is 2.
Similarly, the electronic configuration of O+ can be written as:

Bond order of O2+ = 1/2(8 - 3) = 2.5
The electronic configuration of O2+ ion will be :

Bond order of O2- = 1/2(8 - 5) = 1.5