Website Review | PHP Script - Documentation

Thank you for purchasing website review PHP script. If you have any questions that are beyond the scope of this help file, please feel free to email Thanks so much!

Note. You can view framework's requirements by accessing the requirement checker script via the following URL in a Web browser:
Note. If you installed script not in web-root directory then you need to add RewriteBase /subdir/ into .htaccess file after RewriteEngine on

Database Settings

This application is build on Yii framework.
So, The main Web application configuration file located in ~/root/website_review/config/main.php
Open this file and let's begin with configure database settings. Find following lines and set your own mysql settings
	// Mysql with host: localhost and databse name website_review
	'connectionString' => 'mysql:host=localhost;dbname=website_review',

	// whether to turn on prepare emulation
	'emulatePrepare' => true,

	// db username
	'username' => 'root',

	// db password
	'password' => '',

	// default cahrset
	'charset' => 'utf8',

	// table prefix
	'tablePrefix' => 'ca_',

	// cache time to reduce SHOW CREATE TABLE * queries
	'schemaCachingDuration' => 60 * 60 * 24 * 30,

SMTP Mail Client

To receive emails via contact form you need to configure SMTP client. The same config file:
// your email which will receive messages from contact form
// Mailer extension
'mailer' => array(
	'SMTPAuth' => true,

	// smtp server's port
	'Port' => 25,

	// server's host
	'Host' => '',

	// username
	'Username' => 'username',

	// password
	'Password' => 'password',

	// letter's charset
	'CharSet' => 'UTF-8',
If you do not have possibility to send emails via contact form, then I offer you to remove "Contact us" Link from menu.
Open: ~/root/website_review/views/layouts/main.php file
Remove this line:
<li <?php echo $this -> action -> id == "contact" ? 'class="active"' : ''; ?>><a href="<?php echo $this->createAbsoluteUrl("site/contact") ?>"><?php echo Yii::t("app", "Contact Us") ?></a></li>

Or replace with this one


<li><a href=""><?php echo Yii::t("app", "Contact Us") ?></a></li>

HTTPS Support

In order to get full support of HTTPS you must have Free Unbranded account or Paid account. If you have Free Unbranded account, then paste verification HTML provided by Pagepeeker before verification process.


'pagePeekerVerify'=>'Verification html',
You can find a table below describing different cases

Pagepeeker account type Configuration
Free Unbranded Account
'pagePeekerVerify'=>'Verification html',
Basic Account
Advanced or Premium Account

Pagespeed Insight

The script has integration with Lighthouse. Lighthouse supports latest Pagespeed Insight API and provides HTML representation. It integrated into website review page via iframe. You can configure it via config file.

'categories'=>['performance'], // Array of default selected categories. Leave empty to include all categories. Values: 'performance' | 'accessibility' | 'best-practices' | 'seo' | 'pwa'
'device'=>'desktop', // Default selected device. Values: 'desktop' | 'mobile'
'runInstantly'=>true, // Whether to run analysis instantly after user opens review page. Values: true | false
'show'=>true, // Whether to show Pagespeed Insight Section

How to block domain?

There is possibility to block any domain using regular expression. The config of rules is under ~root/website_review/config/domain_restriction.php. The file contains a lot of examples.


To see the list of available languages find this line:


'languages'=>array('ru'=>'Русский', 'en'=>'English'),

Set default app language.


You can setup as many languages as you want. For example, let's translate application to German.
First of all, create directory with chosen language. In our case language's ID will be de.
Copy files
app.php, meta.php, advice.php
Open them and translate.
Then add new key=>value pair into config file
'languages'=>array('ru'=>'Русский', 'en'=>'English', 'de'=>'Deutsch'),
That is all.

Rate system

You can modify already defined rates with your own. To do this, open ~/root/website_review/vendors/Webmaster/Rates/rates.php file
and set your stats.

Improve website parser

To improve website parser you need to specify common words for specific language. For example: to improve german websites parsing, create ~/root/website_review/vendors/Webmaster/TagCloud/CommonWords/de.php
and set the array of common words. See example how, in en.php file.

Webiste filter

Each webmaster wants to monetize website by adding ads. Of course Google is the best provider. But what will if user will add bad website (ex. I'm speaking about adult content), in this way Google can block displaying advertisment or even remove account. Of course you can monitor each review, but what if they will be thousands? There is a solution to prevent such thing. By default this feature is enabled

Open main config file (~/root/website_review/protected/main.php)
Find following line:

'checkForBadwords' => true,

and set it true to enable automatic site filter or false to disable.

You can manage which words should contains website to be banned. You can find them in ~/root/website_review/config/badwords folder.

Get review via url

By default user can get website's review only by submitting a form, but sometimes really need to get it via requesting url. Read below how to do this.

First of all, you need to allow user send requests to parse controller. To do this open:


and set instantRedir to true

// Allow instant redirect

Next, do a request via browser:[domain]
Where: : the website which you need to analyse
redirect=1 : tell script that we need instant redirect

Social sharing

To include social sharing plugin into review page, you need to register at
Next go to "Dashboard" and choose your suitable plugin. Click on Get this code and copy js source into our local config file in ~root/website_review/config/main.php



This section is for users who has monthly bandwidth limit or hosted on shared hostings. The fact is that in addition to visitors, your website scanning a lot of bots. They generates a lot of traffic, by clicking on links. The one is "pdf generation" link which is generates PDF review. PDF generation is greedy operation and requires more process time, than HTML page generation. Also it's generates more traffic because PDF takes up more space. So, to reduce CPU usage and decrease traffic you need apply reCAPTCHA credentials. To do this go to official reCAPTCHA page and generate for your domain Site key and Secret key keys. Next open ~root/website_review/config/recaptcha.php file and fill out the config:

'public-key'=>'', // Insert your Site key here
'private-key'=>'', // Insert your Secret key here

That's all. Now user must enter valid CAPTCHA to download review in PDF format.

NOTE! If you think that it's bad practice, leave 'public-key' and 'private-key' empty in config file. In this case, anyone can instantly get review in PDF format without entering captcha.

By default the PageSpeed Insights results stored in a separate PDF file. This implemented in this way, because usually basic review + PageSpeed Insights takes about 50 pages. This is not a small amount of data and to generate PDF file containing all the reviews needs about 50-60 seconds (tested on my local PC with SSD). However if you are using this app for personal usage, you could include all reviews in one PDF file. To do this open main config file and set partialPdf to false:


Also I would like to recommend to set

memory_limit = 128M
in php.ini

Application options

Some common options you can change.


// Brand name. Your app name (Will not be translated)
'name'=>'Website Review',

// Websites count in "Rating" section

Cron jobs

This app has already built-in possibility to generate sitemap. Here is instruction how to do this.
To begin with, Command Line do not know the website's host information and etc. For this needs we have console config file.
Open: ~/root/website_review/config/console.php file and configure it.
// your website name: for example:
'hostInfo' => '',

// if you installed script not in root directory, then you need to set baseUrl. For example : /website_review
'baseUrl' => '',
And set command (in my case it's):

0 0 * * * /usr/bin/php /path/to/web/root/website_review/yiic.php sitemap >/dev/null 2>&1
By default sitemap contains links in all languages. For example, if system has 3 languages (en, ru, de) and one reviewed domain (, then in sitemap will appear 3 links:
  • en/
  • ru/
  • de/
This will increase amount of indexed pages in search engines.

If you want links to be added to the sitemap only in the language set by default, then set up following command:
0 0 * * * /usr/bin/php /path/to/web/root/website_review/yiic.php sitemap old >/dev/null 2>&1

NOTE! Script already support multiple sitemap generation. Each sitemap has maximum of 50 000 URLs. If you want to change this number go to: ~/root/website_review/commands/SitemapCommand.php and set any number of $urlCount property.

Resource releasing

Over time PageSpeed Insight table grows up and takes a lot of space in database. You can clear it by running following command
/usr/bin/php /path/to/web/website_review/yiic.php clear psi
Or setup a cron job command (run once per month):
0 0 1  * * /usr/bin/php /path/to/web/website_review/yiic.php clear psi >/dev/null 2>&1
The same thing can be done to clear old PDF reviews. As a command:
/usr/bin/php /path/to/web/website_review/yiic.php clear pdf
Or as a cron task:
0 0 1  * * /usr/bin/php /path/to/web/website_review/yiic.php clear pdf >/dev/null 2>&1
Don't forget to replace "/usr/bin/php" with your PHP executable path and "/path/to/web" with absolute path where script is installed.