HelioNetworks/HelioLinkExchange

View on GitHub
add.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$subject' which will lead to PHP notices.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$message' which will lead to PHP notices.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$to' which will lead to PHP notices.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$headers' which will lead to PHP notices.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid unused local variables such as '$subject'.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$headers'.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$to'.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$message'.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Call to undeclared function \mysql_fetch_array()
Open

    $req1 = mysql_fetch_array(mysql_query('SELECT max(id) AS `id` FROM `topsite`'));
Severity: Critical
Found in add.php by phan

Variable $sname is undeclared
Open

You recieved this message after the subscription of your website (".$_POST['url'].") on our top site at '.$sname.'.
Severity: Minor
Found in add.php by phan

Call to undeclared function \mysql_query()
Open

    if(mysql_query("INSERT INTO `topsite` (id, name, url, clicks, description, banner, email, status) VALUES ('', '".$_POST['name']."', '".$_POST['url']."', 0, '".$_POST['description']."', '".$_POST['banner']."', '".$_POST['email']."', 'no')"))
Severity: Critical
Found in add.php by phan

Variable $mail_webmaster is undeclared
Open

        $headers .= "Reply-To: ".$mail_webmaster."\n";
Severity: Minor
Found in add.php by phan

Variable $sname is undeclared
Open

        $headers = "From: \"".$sname." Admin\"<".$mail_webmaster.">\n";
Severity: Minor
Found in add.php by phan

Variable $headers is undeclared
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phan

Variable $subject is undeclared
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phan

Variable $message is undeclared
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phan

Variable $sname is undeclared
Open

$dc = "Add your site to link directory at ".$sname;
Severity: Minor
Found in add.php by phan

Variable $sname is undeclared
Open

        $subject = 'Your website subscription at '.$sname;
Severity: Minor
Found in add.php by phan

Variable $to is undeclared
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phan

Variable $mail is undeclared
Open

    if($mail)
Severity: Minor
Found in add.php by phan

Variable $mail_webmaster is undeclared
Open

        $headers = "From: \"".$sname." Admin\"<".$mail_webmaster.">\n";
Severity: Minor
Found in add.php by phan

Call to undeclared function \mysql_close()
Open

mysql_close();
Severity: Critical
Found in add.php by phan

Call to undeclared function \mysql_query()
Open

    $req1 = mysql_fetch_array(mysql_query('SELECT max(id) AS `id` FROM `topsite`'));
Severity: Critical
Found in add.php by phan

Avoid variables with short names like $to. Configured minimum length is 3.
Open

    mail($to,$subject,$message,$headers);
Severity: Minor
Found in add.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

There are no issues that match your filters.

Category
Status