The perimeter \( P \) of a square is calculated using the formula:
\[ P = 4s \]
where \( s \) is the length of one side of the square.
According to the problem, the perimeter is \( 28 \) when the length of a side is \( 7 \):
\[ P = 4 \times 7 = 28 \]
Given that the perimeter is directly proportional to the length of one side, we can express this relationship mathematically as:
\[ P = k \cdot s \]
where \( k \) is the constant of proportionality.
Since we know the values of \( P \) and \( s \):
\[ 28 = k \cdot 7 \]
To find \( k \), we can rearrange the equation:
\[ k = \frac{28}{7} = 4 \]
Thus, the constant of proportionality is \( 4 \).
The answer is \( \boxed{4} \).