74% hostry-pagespeed-booster

Code Review | Hostry PageSpeed Booster

WordPress plugin Hostry PageSpeed Booster scored 74% from 54 tests.

About plugin

  • Plugin page: hostry-pagespeed-...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Mar 22, 2019
  • Latest release: Feb 25, 2021
  • Number of updates: 16
  • Update frequency: every 44.2 days
  • Top authors: hostry (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

40+ active / 2,917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼7.18ms] Passed 4 tests

An overview of server-side resources used by Hostry PageSpeed Booster
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2137.35 ▼10.10
Dashboard /wp-admin3.48 ▲0.1851.40 ▼5.13
Posts /wp-admin/edit.php3.59 ▲0.2450.16 ▼1.33
Add New Post /wp-admin/post-new.php6.06 ▲0.1786.58 ▼12.17
Media Library /wp-admin/upload.php3.40 ▲0.1738.58 ▲2.82
PageSpeed Booster /wp-admin/options-general.php?page=pagespeed-booster3.4335.51

Server storage [IO: ▲0.57MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 157 new files
Database: no new tables, 7 new options
New WordPress options
cdn_minifier_hostry
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Hostry PageSpeed Booster
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,715 ▼4213.37 ▼1.211.75 ▼0.6838.24 ▼1.13
Dashboard /wp-admin2,211 ▲234.92 ▼0.99103.31 ▼0.6978.62 ▲37.09
Posts /wp-admin/edit.php2,100 ▲112.00 ▼0.0638.59 ▲1.9332.79 ▼0.28
Add New Post /wp-admin/post-new.php1,671 ▲13722.52 ▼0.82748.97 ▲78.0443.41 ▼10.59
Media Library /wp-admin/upload.php1,393 ▲84.24 ▲0.0397.24 ▼9.1073.53 ▲29.71
PageSpeed Booster /wp-admin/options-general.php?page=pagespeed-booster1,0752.0624.5931.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 72× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\\Parser\\Handler\\AbstractHandlerTest' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Node/NegationNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/XPath/Translator.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Node/HashNode.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\ode\\AbstractNodeTest' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/hostry-pagespeed-booster/includes/vendor/symfony/css-selector/Parser/Handler/HashHandler.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: google search console, minify, pagespeed, cdn, seo

hostry-pagespeed-booster/cdn-minifier.php 92% from 13 tests

The principal PHP file in "Hostry PageSpeed Booster" v. 1.2.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hostry-pagespeed-booster.php" instead of "cdn-minifier.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please fix the following items
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/hostry-pagespeed-booster/includes/vendor/bin/minifycss.bat
      • wp-content/plugins/hostry-pagespeed-booster/includes/vendor/bin/minifyjs.bat
9,649 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
PHP1122,0755,5768,265
JSON700472
HTML200356
Markdown71340251
PO File14752204
XML23039
YAML10031
Bourne Shell26212
Dockerfile12011
DOS Batch2008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.34
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces22
Interfaces9
Traits0
Classes95
▷ Abstract classes77.37%
▷ Concrete classes8892.63%
▷ Final classes11.14%
Methods625
▷ Static methods497.84%
▷ Public methods52884.48%
▷ Protected methods7111.36%
▷ Private methods264.16%
Functions32
▷ Named functions412.50%
▷ Anonymous functions2887.50%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-48x48.png2.92KB1.84KB▼ 37.11%
assets/images/hostry-16x16.png1.40KB0.81KB▼ 41.94%