71% courier-home

Code Review | Hublle

WordPress plugin Hublle scored71%from 54 tests.

About plugin

  • Plugin page: courier-home
  • Plugin version: 1.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-8.4
  • WordPress version: 6.3.1
  • First release: Oct 19, 2021
  • Latest release: Sep 16, 2023
  • Number of updates: 23
  • Update frequency: every 30.3 days
  • Top authors: prateeks885 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,154 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼16.96ms] 75% from 4 tests

A check of server-side resources used by Hublle
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 510.94ms on /wp-admin/admin.php?page=hbl-started)
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3730.07 ▼7.64
Dashboard /wp-admin3.82 ▲0.5147.99 ▼0.51
Posts /wp-admin/edit.php3.85 ▲0.4948.86 ▼0.66
Add New Post /wp-admin/post-new.php3.59 ▼2.3040.33 ▼59.01
Media Library /wp-admin/upload.php3.75 ▲0.5238.64 ▲4.93
Settings /wp-admin/admin.php?page=chm-settings3.6239.30
Getting Started /wp-admin/admin.php?page=hbl-started3.63510.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hublle
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,524 ▼22213.15 ▼1.232.93 ▲1.2610.48 ▼28.40
Dashboard /wp-admin2,244 ▲565.88 ▲1.0096.61 ▼14.9543.45 ▼3.78
Posts /wp-admin/edit.php2,133 ▲441.99 ▼0.0234.76 ▼5.2937.66 ▲2.60
Add New Post /wp-admin/post-new.php1,400 ▼11421.62 ▲4.21570.61 ▼77.20108.61 ▲58.92
Media Library /wp-admin/upload.php1,432 ▲414.16 ▼0.01119.54 ▲22.6345.05 ▲2.52
Settings /wp-admin/admin.php?page=chm-settings9322.0626.3943.07
Getting Started /wp-admin/admin.php?page=hbl-started8682.0829.1432.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • chm_authed_api_key
    • can_compress_scripts
    • chm_authed_secret_key
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/courier-home/includes/admin/hbl-onboarding.php
    • > /wp-content/plugins/courier-home/hublle.php
  • 41× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/courier-home/hublle.php on line 24
    • > PHP Warning
      include_once(): Failed opening 'CHM_DIR_PATHincludes/traits/webhooks.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/courier-home/includes/class/class-chm-api.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'ChmBase' not found in wp-content/plugins/courier-home/includes/class/class-hbl-api.php:4
    • > PHP Notice
      Undefined variable: step in wp-content/plugins/courier-home/includes/admin/hbl-onboarding.php on line 262
    • > PHP Warning
      Use of undefined constant CHM_DIR_PATH - assumed 'CHM_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/courier-home/includes/class/class-chm-api.php on line 3
    • > PHP Notice
      Undefined variable: domain in wp-content/plugins/courier-home/includes/admin/hbl-onboarding.php on line 350
    • > PHP Warning
      include_once(CHM_DIR_PATHincludes/admin/form-fields.php): failed to open stream: No such file or directory in wp-content/plugins/courier-home/includes/admin/chm-admin.php on line 2
    • > PHP Warning
      Use of undefined constant CHM_PLUGIN_URL - assumed 'CHM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/courier-home/includes/admin/hbl-onboarding.php on line 142
    • > PHP Warning
      include_once(CHM_DIR_PATHincludes/class//class-woo.php): failed to open stream: No such file or directory in wp-content/plugins/courier-home/includes/traits/webhooks.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'CHM_DIR_PATHincludes/admin/form-fields.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/courier-home/includes/admin/chm-admin.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hbl-started
    • > Network (severe)
    wp-content/plugins/courier-home/images/logo-white.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=hbl-started
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=hbl-started 0:0 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: The official readme.txt might help

courier-home/hublle.php 69% from 13 tests

This is the main PHP file of "Hublle" version 1.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/#")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("#")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("courier-home.php" instead of "hublle.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,939 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP182752692,633
CSS26871,075
JavaScript2223226
Markdown1305

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity39.29
▷ Minimum class complexity5.00
▷ Maximum class complexity93.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits3
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods96
▷ Static methods00.00%
▷ Public methods9194.79%
▷ Protected methods00.00%
▷ Private methods55.21%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.52MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/img-02.png237.19KB108.82KB▼ 54.12%
images/onboard-logo.png38.96KB11.85KB▼ 69.59%
images/handshake.png6.23KB2.82KB▼ 54.70%
images/logo-new.png38.96KB11.85KB▼ 69.59%
images/img-step-3.png129.77KB62.21KB▼ 52.06%