Issues (15)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

includes/admin/class-alnp-getting-started.php (2 issues)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Auto Load Next Post Getting Started class
4
 *
5
 * Thanks the user for choosing Auto Load Next Post.
6
 *
7
 * @since    1.6.0
8
 * @author   Sébastien Dumont
9
 * @category Classes
10
 * @package  Auto Load Next Post/Classes/Getting Started
11
 * @license  GPL-2.0+
12
 */
13
14
// Exit if accessed directly.
15
if ( ! defined( 'ABSPATH' ) ) {
16
	exit;
17
}
18
19
if ( ! class_exists( 'ALNP_Getting_Started' ) ) {
20
21
	class ALNP_Getting_Started {
22
23
		/**
24
		 * Initialize Getting Started.
25
		 *
26
		 * @access public
27
		 */
28
		public function __construct() {
29
			$this->id    = 'getting-started';
0 ignored issues
show
The property id does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
30
			$this->label = esc_html__( 'Getting Started', 'auto-load-next-post' );
0 ignored issues
show
The property label does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
31
32
			add_action( 'auto_load_next_post_settings_end', array( $this, 'output' ), 10, 2 );
33
		} // END __construct()
34
35
		/**
36
		 * Output the getting started page.
37
		 * 
38
		 * @access public
39
		 * @param string $current_view
40
		 */
41
		public function output( $current_view ) {
42
			if ( $current_view !== 'getting-started' ) {
43
				return;
44
			}
45
46
			// Get active theme
47
			$active_theme = wp_get_theme();
48
			?>
49
			<div class="auto-load-next-post getting-started">
50
51
				<div class="container">
52
53
					<div class="content">
54
						<div class="logo">
55
							<a href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>" target="_blank">
56
								<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/logo.png'; ?>" alt="<?php esc_html_e( 'Auto Load Next Post', 'auto-load-next-post' ); ?>" />
57
							</a>
58
						</div>
59
60
						<h1><?php printf( __( 'Getting started with %s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></h1>
61
62
						<p><strong><?php printf( __( 'Thanks for choosing %s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></strong></p>
63
64
						<p><?php echo esc_html__( 'Your well on your way to increasing your pageviews by engaging your site viewers to keep reading your content and reduce bounce rate.', 'auto-load-next-post' ); ?></p>
65
66
						<?php
67
						// Is Theme already supported?
68
						if ( is_alnp_supported() ) {
69
						?>
70
							<p><?php echo sprintf( __( 'Your active theme %1$s supports %2$s so everything is already setup for you.', 'auto-load-next-post' ), '<strong>' . $active_theme->name . '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
71
						<?php
72
						} else {
73
						?>
74
							<p><?php echo sprintf( __( 'Run the %1$s to be ready in less than 5-minutes, setting up %2$s for the first time is easy. The wizard will scan your theme to process the installation.', 'auto-load-next-post' ), esc_html__( 'Setup Wizard', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
75
76
							<p><strong class="red"><?php _e( 'Developers:', 'auto-load-next-post' ); ?></strong> <?php printf( __( 'Enable %1$sWP_DEBUG%2$s in your %3$swp-config.php%4$s file before running the %5$s to provide you results for each step once it has scanned your theme.', 'auto-load-next-post' ), '<strong>', '</strong>', '<code>', '</code>', esc_html__( 'Setup Wizard', 'auto-load-next-post' ) ); ?></p>
77
78
							<p><?php echo sprintf( __( 'You can add support for %1$s for future users by viewing the documentation and developer guides, snippets and more.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
79
80
							<?php
81
							/**
82
							 * Display content if you have Auto Load Next Post Pro installed or not.
83
							 */
84
							if ( is_alnp_pro_version_installed() ) {
85
								include( dirname( __FILE__ ) . '/views/html-getting-started-pro.php' );
86
							}
87
							?>
88
89
							<p style="text-align: center;">
90
								<a class="button button-primary button-large" href="<?php echo add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'setup-wizard' ), admin_url( 'options-general.php' ) ); ?>"><?php _e( 'Setup Wizard', 'auto-load-next-post' ); ?></a>
91
								<a class="button button-large" href="<?php echo AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL; ?>"><?php _e( 'View Documentation', 'auto-load-next-post' ); ?></a>
92
							</p>
93
94
							<hr>
95
							<?php
96
						}
97
						?>
98
99
						<p><?php echo sprintf(
100
							/* translators: 1: Opening <a> tag to the Auto Load Next Post Twitter account, 2: Opening <a> tag to the Auto Load Next Post Instagram account, 3: Opening <a> tag to the Auto Load Next Post contact page, 4: Opening <a> tag to the Auto Load Next Post newsletter, 5: Closing </a> tag */
101
							esc_html__( 'If you have any questions or feedback, let me know on %1$sTwitter%5$s, %2$sInstagram%5$s or via the %3$sContact page%5$s. Also, %4$ssubscribe to my newsletter%5$s if you want to stay up to date with what\'s new and upcoming in Auto Load Next Post.', 'auto-load-next-post' ), '<a href="https://twitter.com/autoloadnxtpost" target="_blank">', '<a href="https://instagram.com/autoloadnextpost" target="_blank">', '<a href="https://autoloadnextpost.com/contact/" target="_blank">', '<a href="http://eepurl.com/bvLz2H" target="_blank">', '</a>'
102
						);
103
						?></p>
104
105
						<p><?php echo esc_html__( 'Enjoy!', 'auto-load-next-post' ); ?></p>
106
					</div>
107
108
				</div>
109
110
			</div>
111
		<?php
112
		} // END output()
113
114
	} // END class
115
116
} // END if class
117
118
return new ALNP_Getting_Started();