Function GetSwfVer
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function GetSwfVer() {
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AC_GetArgs
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AC_GetArgs(args, ext, srcParamName, classid, mimeType) {
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
Function DetectFlashVer
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {
versionStr = GetSwfVer();
if (versionStr == -1) {
return false;
} else if (versionStr != 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ControlVersion
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ControlVersion() {
var version;
var axo;
var e;
Function ControlVersion
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function ControlVersion() {
var version;
var axo;
var e;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GetSwfVer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function GetSwfVer() {
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
Function DetectFlashVer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {
versionStr = GetSwfVer();
if (versionStr == -1) {
return false;
} else if (versionStr != 0) {
Function AC_Generateobj
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function AC_Generateobj(objAttrs, params, embedAttrs) {
var str = '';
if (isIE && isWin && !isOpera) {
str += '<object ';
for (var i in objAttrs) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AC_GetArgs
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function AC_GetArgs(args, ext, srcParamName, classid, mimeType) {
Avoid too many return
statements within this function. Open
return false;