Beispiel #1
0
									</div>
									<div class="col-lg-6 col-sm-6">
										<div class="summary-info clearfix">
											<?php 
$device = 'desktop';
?>
											<div class="screenshot <?php 
echo $device;
?>
" style="-webkit-user-select: none;">
												<div class="screenshot-img-container">
													<img class="img-responsive" src="data:<?php 
echo $pageSpeed[$device]['screenshot']['mime_type'];
?>
;base64,<?php 
echo PageSpeedInsights::decodeData($pageSpeed[$device]['screenshot']['data']);
?>
">
												</div>
											</div>
											<div class="clearfix">
												<p></p>
												<?php 
foreach ($pageSpeed[$device]['formattedResults']['ruleResults'] as $group => $impacts) {
    ?>
												<div class="clearfix">
													<div class="col-sm-6 p5 text-right text-left-xs">
														<label class="font-sm"><?php 
    echo _t($group);
    ?>
</label>
Beispiel #2
0
<br pagebreak="true"/>
<div class="clearfix">
	<div class="text-center sector-title"><?php 
echo _t('Online & Social Visibility');
?>
</div>
</div>
<div class="clearfix">
	<h3 class="socialgrader"><?php 
echo _t('Social Grade');
?>
</h3>
	<div class="clearfix">
		<span class="dib label score-label label-<?php 
echo PageSpeedInsights::getClassFromScore($grader['score']);
?>
"><?php 
echo '&nbsp;&nbsp;' . $grader['score'];
?>
 / 100&nbsp;&nbsp;</span>
	</div>
</div>

<div class="clearfix">
	<?php 
$advice[6][0] = $grader['facebook_page'] !== '' ? 'success' : 'error';
$advice[6][1] = $grader['twitter_page'] !== '' ? 'success' : 'error';
$advice[6][2] = $grader['gplus_page'] !== '' ? 'success' : 'error';
$advice[6][3] = $grader['youtube_page'] !== '' ? 'success' : 'error';
$advice[6][4] = $grader['linkedin_page'] !== '' ? 'success' : 'error';
$advice[6][5] = $grader['pinterest_page'] !== '' ? 'success' : 'error';
Beispiel #3
0
    foreach ($result['formattedResults']['ruleResults'] as $group => $impacts) {
        ?>
						<?php 
        if ($j != 0) {
            echo '<br pagebreak="true"/>';
        }
        ?>
                        <?php 
        $score = $results[$device]['ruleGroups'][$group]['score'];
        ?>

                        <table cellpadding="5">
                            <tr>
                                <td>
                                    <span class="label label-<?php 
        echo PageSpeedInsights::getClassFromScore($score);
        ?>
"><?php 
        echo '&nbsp;&nbsp;' . $score;
        ?>
 / 100&nbsp;&nbsp;</span>
                                    &nbsp;&nbsp;&nbsp;<span class="score-header"><?php 
        echo _t($group);
        ?>
</span>
                                    <!-- Impact groups (success, warning, important) -->
                                    <?php 
        foreach ($impacts as $impactId => $impact) {
            if ($impactId !== 'success' && !empty($impact)) {
                ?>
                                        <h5 class="impact-title">
Beispiel #4
0
 private function parseWebsite()
 {
     $document = new Document($this->html);
     $this->document["doctype"] = $document->getDoctype();
     $this->document["isPrintable"] = $document->isPrintable();
     $this->document["appleIcon"] = $document->issetAppleIcon();
     $this->document["deprecatedTags"] = $document->getDeprecatedTags();
     $this->document["langID"] = $document->getLanguageID();
     //$this -> document["langID"] = $this->lang;
     $this->document["cssCount"] = $document->getCssFilesCount();
     $this->document["jsCount"] = $document->getJsFilesCount();
     $favicon = new Favicon($this->html, $this->domain);
     $this->favicon = $favicon->getFavicon();
     $content = new Content($this->html);
     $this->content["flash"] = $content->issetFlash();
     $this->content["iframe"] = $content->issetIframe();
     $this->content["headings"] = $content->getHeadings();
     $this->content["issetHeadings"] = !Helper::isEmptyArray($this->content["headings"]);
     $this->content["nestedTables"] = $content->issetNestedTables();
     $this->content["inlinceCss"] = $content->issetInlineCss();
     $this->content["email"] = $content->issetEmail();
     $image = new Image($this->html);
     $this->image["totalCount"] = $image->getTotal();
     $this->image["totalAlt"] = $image->getAltCount();
     $links = new Links($this->html, $this->domain);
     $this->links["links"] = $links->getLinks();
     $this->links["internal"] = $links->getInternalCount();
     $this->links["externalNofollow"] = $links->getExternalNofollowCount();
     $this->links["externalDofollow"] = $links->getExternalDofollowCount();
     $this->links["files"] = $links->getFilesCount();
     $this->links["issetUnderscore"] = $links->issetUnderscore();
     $this->links["friendly"] = $links->isAllLinksAreFriendly();
     $metatags = new MetaTags($this->html);
     $this->metatags["title"] = $metatags->getTitle();
     $this->metatags["description"] = $metatags->getDescription();
     $this->metatags["keywords"] = $metatags->getKeywords();
     $this->metatags["charset"] = $metatags->getCharset();
     $this->metatags["viewport"] = $metatags->getViewPort() !== null ? 1 : 0;
     $this->metatags["dublincore"] = $metatags->getDublinCore();
     $this->metatags["ogproperties"] = $metatags->getOgMetaProperties();
     $seoanalyse = new SeoAnalyse($this->html);
     $this->seoanalyse['htmlratio'] = $seoanalyse->getHtmlRatio();
     $validation = new Validation($this->domain);
     $this->validation["w3c"] = $validation->w3cHTML();
     $tagcloud = new TagCloud($this->html, $this->lang);
     $analyser = $this->CI->config->item('analyser');
     $this->tagcloud = $tagcloud->generate($analyser["tagCloud"]);
     $matrix = new SearchMatrix();
     $matrix->addWords(array_slice(array_keys($this->tagcloud), 0, $analyser["consistencyCount"]));
     $matrix->addSearchInString("title", $this->metatags["title"]);
     $matrix->addSearchInString("description", $this->metatags["description"]);
     $matrix->addSearchInString("keywords", $this->metatags["keywords"]);
     $matrix->addSearchInArrayRecursive("headings", $this->content["headings"]);
     $this->matrix = $matrix->generate();
     $optimization = new Optimization($this->domain);
     $analytics = new AnalyticsFinder($this->html);
     $this->misc['sitemap'] = $optimization->getSitemap();
     $this->misc['robotstxt'] = $optimization->hasRobotsTxt();
     $this->misc['gzip'] = $optimization->hasGzipSupport();
     $this->misc['analytics'] = $analytics->findAll();
     $this->score = $this->getScore();
     $p = new PageSpeedInsights($this->domain, $this->CI->config->item('googleApiKey'));
     $p->setLocale($this->CI->config->item('langshort'));
     $results = $p->getResults();
     $this->pagespeed = $results;
     // Social grader
     $s = new Socialgrader($this->html, $this->domain);
     $this->grader = $s->grader();
 }