The explanation seems to me a little bit blurred...
The source is "traditional" logic.
See Port Royal Logic:
[for] Port-Royal [...] the significance of general ideas has two aspects: the comprehension [la comprehension] and the extension [l'étendue]. The comprehension consists in the set of attributes essential to the idea. For example, the comprehension of the idea ‘triangle’ includes the attributes extension, shape, three lines, and three angles. The extension of the idea consists in the inferiors or subjects to which the term applies, which for Port-Royal includes “all the different species of triangles”.
See: Antoine Arnauld, Pierre Nicole, La logique ou l'art de penser (3eme ed, 1668), page 69.
We can consider the "trivial" example :
In this case, we have that the concept "humanity" has two attributes: "animality" and "rationality". They are its comprehension (later: intension).
The "subordinate" concepts of European, American, etc. (“all the different species of humans”) are the extension.
Following the Scottish philosopher William Hamilton, in his Logic, page 59, the distiction has been reformulated as that between intension and extension:
As a concept, or notion, is a thought in which an indefinite plurality of characters is bound up into a unity of consciousness, and applicable to an indefinite plurality of objects, a concept is, therefore, necessarily a quantity,and a quantity varying in amount according to the greater or
smaller number of characters of which it is the complement, and the greater or smaller number of things of which it may be said. This quantity is thus of two kinds ; as it is either an Intensive or an Extensive. The Internal or Intensive Quantity of a concept is determined by the greater or smaller number of
constituent characters contained in it. The External or Extensive Quantity of a concept is determined by the greater or smaller number of classified concepts or realities contained under it.
The Internal Quantity of a notion, its Intension or Comprehension, is made up of those different attributes oi which the concept is the conceived sum; that is, the various characters connected by the concept itself into a single whole in thought. The External Quantity of a notion or its extension is, on the other hand, made up of the number of objects which are thought mediately through a
concept. For example, the attributes rational, sensible, moral, etc., go to constitute the intension or internal quantity of the concept man; whereas the attributes European, American,philosopher, tailor, etc., go to make up a concept of this or that individual man. [...] Both quantities are said to contain ; but the quantity of extension is said to contain under it ; the quantity of comprehension is said to contain in it.
By the intension, comprehension, or depth of a notion, we think the most qualities of the fewest objects ; whereas by the extension or breadth of a concept, we think the fewest qualities of the most objects. [...]
Again you will observe the two following distinctions : the first — the exposition of the Comprehension of a notion is called its Definition (a simple notion can not, therefore, be defined) ; the second — the exposition of the Extension of a notion is called its Division (an individual notion can not be divided).
The concept of extension evolved in modern logic into the Axiom of comprehension; see Bertrand Russell, The Principles of Mathematics (1903), §102:
The reason that a contradiction [i.e. Russell's Paradox] emerges here is
that we have taken it as an axiom that any propositional function containing
only one variable is equivalent to asserting membership of a class defined by
the propositional function.
The axiom licenses the existence of a collection (or set) for every formula expressing the properties or attributes of some concept (or idea).
The properties described by the formula ate the comprehension of the concept, while the collection of the objects satisfying the formula is its extension.