A method for evaluating code in hierarchical architecture software, comprising: acquiring layer definition information of hierarchical architecture software to be tested; the layer definition information comprising hierarchy information of the hierarchical architecture software to be tested and information of a component included in each layer; scanning code of the hierarchical architecture software to be tested, to acquire basic information of the code; the basic information comprising component information, intra-component file information and intra-file code metric information; the code metric information comprising the number of lines of code and/or the number of functions; mapping the basic information with the layer definition information, to obtain file information of each component in each layer of the hierarchical architecture software to be tested and intra-file code metric information; characterized in: calculating a code evaluation parameter of the hierarchical architecture software to be tested, on the basis of the file information of each component in each layer and the intra-file code metric information; the code evaluation parameter comprising: a layer thickness characterizing a layer software scale and/or a component thickness characterizing a software scale of each component in each layer; and presenting, on the basis of the layer thickness and the thickness of each component in each layer, all of the layers of the hierarchical architecture software to be tested and all of the components in each layer by means of a graph that is directly proportional to the layer thickness and the thickness of each component in each layer. acquiring layer definition information of hierarchical architecture software to be tested; the layer definition information comprising hierarchy information of the hierarchical architecture software to be tested and information of a component included in each layer; scanning code of the hierarchical architecture software to be tested, to acquire basic information of the code; the basic information comprising component information, intra-component file information and intra-file code metric information; the code metric information comprising the number of lines of code and/or the number of functions; mapping the basic information with the layer definition information, to obtain file information of each component in each layer of the hierarchical architecture software to be tested and intra-file code metric information; characterized in: calculating a code evaluation parameter of the hierarchical architecture software to be tested, on the basis of the file information of each component in each layer and the intra-file code metric information; the code evaluation parameter comprising: a layer thickness characterizing a layer software scale and/or a component thickness characterizing a software scale of each component in each layer; and presenting, on the basis of the layer thickness and the thickness of each component in each layer, all of the layers of the hierarchical architecture software to be tested and all of the components in each layer by means of a graph that is directly proportional to the layer thickness and the thickness of each component in each layer. calculating a code evaluation parameter of the hierarchical architecture software to be tested, on the basis of the file information of each component in each layer and the intra-file code metric information; the code evaluation parameter comprising: a layer thickness characterizing a layer software scale and/or a component thickness characterizing a software scale of each component in each layer; and presenting, on the basis of the layer thickness and the thickness of each component in each layer, all of the layers of the hierarchical architecture software to be tested and all of the components in each layer by means of a graph that is directly proportional to the layer thickness and the thickness of each component in each layer.