OnCollisionEnter doesn't work correct

I try to make a copy of the impossible game: The Impossible Game 2 - Free Download

Red square are move in the right direction and when player see blue square, he should jump. If he will collide with the left side of the square (which is another square “WallCollider”), the game is ower. It works, but if player will jump on the upper left corner, the game will be over too. Can’t understand, why.

void OnCollisionEnter(Collision collision)
{
    if (collision.transform.name == "WallCollider")
        Debug.Log ("You lose");
}

Edit 1:

Red and blue squares and WallCollider have box colliders.
Only red square have a rigidbody.

I move red like this:

    public GameObject player;

	public float speed = 5.0f;
	public float jumpPower = 10.0f;

	void Start ()
	{
	    player = (GameObject)this.gameObject;
	}

	void Update ()
	{
	    player.transform.position +=
		player.transform.right * speed * Time.deltaTime;
	}

Yes I’m using 3d physics in a 2d environment.
All scripts is located on the red square (player).

Blue box have one box collider. But near it I have WallCollider (Cube too), which have a box collider too, but it’s height a little bit lower.

In the Edit/Project settings/Time I’ve changed Fixed Timestep from 0.02 to 0.002 and now it works