Orchard planting problem for squares

The classic Orchard planting problem asks for the maximum number of 3-point straight lines attainable from a configuration of $$n$$ points drawn on a plane.

Here we are interested in a variant of this problem. What is the maximum number of squares attainable from a configuration of 10 points drawn on a plane? Each corner of an attained square must contain a point.

Here is a similar puzzle for circles: Orchard planting problem for circles

• Just to clarify, are all the sides of a square the same length and at a 90 degree angle? Or are trapezium's allowed? – LiefdeWen Sep 1 '20 at 7:47
• squares must have sides of the same length and 90 degree angles. – Dmitry Kamenetsky Sep 1 '20 at 8:34

$$7$$ squares
That is, four of side length $$1$$, one of side length $$2$$ and two of side length $$\sqrt{2}$$.