77% hostinger

Code Review | Hostinger

WordPress plugin Hostinger scored77%from 54 tests.

About plugin

  • Plugin page: hostinger
  • Plugin version: 1.9.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Nov 3, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 23
  • Update frequency: every 1.1 days
  • Top authors: Hostinger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000,000+ active /532,406 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.72ms] Passed 4 tests

Server-side resources used by Hostinger
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.96 ▼6.12
Dashboard /wp-admin3.53 ▲0.1848.67 ▼12.86
Posts /wp-admin/edit.php3.58 ▲0.2252.58 ▲3.96
Add New Post /wp-admin/post-new.php6.07 ▲0.1890.94 ▼4.87
Media Library /wp-admin/upload.php3.39 ▲0.1636.07 ▲0.97

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 126 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
db_upgraded
hostinger_first_login_at
aioseo_activation_redirect
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
wpforms_activation_redirect
optin_monster_api_activation_redirect_disabled

Browser metrics Passed 4 tests

Checking browser requirements for Hostinger
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9214.96 ▲0.241.68 ▲0.0937.72 ▼5.04
Dashboard /wp-admin2,262 ▲856.87 ▲1.29144.38 ▲44.7442.54 ▼0.45
Posts /wp-admin/edit.php2,166 ▲664.06 ▲2.0452.62 ▲13.5634.27 ▼3.00
Add New Post /wp-admin/post-new.php1,580 ▲4524.51 ▲1.14604.65 ▼39.2829.58 ▼23.97
Media Library /wp-admin/upload.php1,469 ▲726.31 ▲2.09101.15 ▲0.7039.45 ▼3.56
Get started /wp-admin/admin.php?page=hostinger&#home2,65910.82347.08100.66
Learn /wp-admin/admin.php?page=hostinger&#learn2,76410.98314.7375.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • widget_recent-comments
    • wpforms_activation_redirect
    • widget_theysaidso_widget
    • aioseo_activation_redirect
    • db_upgraded
    • optin_monster_api_activation_redirect_disabled
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Onboarding_Step' not found in wp-content/plugins/hostinger/includes/admin/onboarding/steps/class-hostinger-onboarding-add-post.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Helper' not found in wp-content/plugins/hostinger/includes/amplitude/class-hostinger-amplitude.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Onboarding_Step' not found in wp-content/plugins/hostinger/includes/admin/onboarding/steps/class-hostinger-onboarding-add-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/hostinger/includes/class-hostinger-errors.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/hostinger/includes/views/hostinger-coming-soon.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Onboarding_Step' not found in wp-content/plugins/hostinger/includes/admin/onboarding/steps/class-hostinger-onboarding-logo-step.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Onboarding_Step' not found in wp-content/plugins/hostinger/includes/admin/onboarding/steps/class-hostinger-onboarding-add-product.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Onboarding_Step' not found in wp-content/plugins/hostinger/includes/admin/onboarding/steps/class-hostinger-onboarding-connect-domain.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Onboarding_Step' not found in wp-content/plugins/hostinger/includes/admin/onboarding/steps/class-hostinger-onboarding-description.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Hostinger_Onboarding_Step' not found in wp-content/plugins/hostinger/includes/admin/onboarding/steps/class-hostinger-onboarding-image-step.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hostinger&#learn
    • > Console-api (warning) in wp-content/plugins/hostinger/assets/js/main.js?ver=1.9.5+1:194960
    VIDEOJS:" "WARN:" "Player \"hts-video-player\" is already initialised. Options will not be applied.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hostinger&#learn
    • > Other (warning) in unknown
    https://www.youtube.com/s/player/31e0b6d9/www-widgetapi.vflset/www-widgetapi.js 1248 Unrecognized feature: 'web-share'.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hostinger&#learn
    • > Console-api (warning) in wp-content/plugins/hostinger/assets/js/main.js?ver=1.9.5+1:194960
    VIDEOJS:" "WARN:" "videojs.createTimeRange is deprecated and will be removed in 9.0; please use videojs.time.createTimeRanges instead.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Contributors: Contributors not specified
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7 in hostinger/assets to your readme.txt
You can take inspiration from this readme.txt

hostinger/hostinger.php 92% from 13 tests

The main file in "Hostinger" v. 1.9.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.9" instead of "5.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected17,699 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
JSON20011,293
PO File109891,1883,357
PHP40338781,689
Sass91900971
JavaScript8413321
SVG100066
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes12.86%
▷ Concrete classes3497.14%
▷ Final classes00.00%
Methods141
▷ Static methods139.22%
▷ Public methods11984.40%
▷ Protected methods00.00%
▷ Private methods2215.60%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants46
▷ Global constants1021.74%
▷ Class constants3678.26%
▷ Public constants2569.44%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.63MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-772x250.png55.34KB23.80KB▼ 57.00%
assets/images/illustration.png85.65KB37.44KB▼ 56.29%
src/images/illustration.png85.65KB37.44KB▼ 56.29%
assets/images/banner-1544x500.png171.72KB81.57KB▼ 52.50%
assets/images/point-domain-cover.png10.51KB4.47KB▼ 57.48%