66% hubaga

Code Review | Hubaga - Sell Digital Downloads

WordPress plugin Hubaga - Sell Digital Downloads scored 66% from 54 tests.

About plugin

  • Plugin page: hubaga
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 5.8.1
  • First release: Nov 3, 2017
  • Latest release: Nov 18, 2017
  • Number of updates: 10
  • Update frequency: every 1.6 days
  • Top authors: picocodes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.32MB] [CPU: ▼133.07ms] Passed 4 tests

An overview of server-side resources used by Hubaga - Sell Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲1.1548.48 ▲14.26
Dashboard /wp-admin4.43 ▲1.3758.65 ▲9.61
Posts /wp-admin/edit.php4.48 ▲1.3756.80 ▲9.19
Add New Post /wp-admin/post-new.php6.86 ▲1.43102.10 ▼555.79
Media Library /wp-admin/upload.php4.37 ▲1.3739.43 ▲4.71
Coupons /wp-admin/edit.php?post_type=h_coupon4.4243.92
Hubaga /wp-admin/edit.php?post_type=h_product4.4243.42
Reports /wp-admin/edit.php?post_type=h_product&page=hubaga-reports4.3851.32
Add product /wp-admin/post-new.php?post_type=h_product4.49167.22
System Status /wp-admin/edit.php?post_type=h_product&page=hubaga-status4.3742.81
Orders /wp-admin/edit.php?post_type=h_order4.4246.30
Settings /wp-admin/edit.php?post_type=h_product&page=hubaga-settings4.3853.50

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 118 new files
Database: no new tables, 2 new options
New WordPress options
hubaga
widget_widget_product_title

Browser metrics Passed 4 tests

A check of browser resources used by Hubaga - Sell Digital Downloads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,979 ▲40716.46 ▲0.4918.32 ▲8.0846.30 ▼0.89
Dashboard /wp-admin3,089 ▲1616.20 ▲0.24140.63 ▼9.62125.82 ▲16.01
Posts /wp-admin/edit.php2,816 ▲772.99 ▲0.2770.45 ▲3.5485.37 ▼17.13
Add New Post /wp-admin/post-new.php1,681 ▼222.47 ▲3.73299.24 ▼102.94110.83 ▲5.18
Media Library /wp-admin/upload.php1,884 ▲775.39 ▲0.37158.52 ▲3.83119.08 ▲5.63
Coupons /wp-admin/edit.php?post_type=h_coupon1,5042.6964.8767.63
Hubaga /wp-admin/edit.php?post_type=h_product1,5302.6964.5073.98
Reports /wp-admin/edit.php?post_type=h_product&page=hubaga-reports1,5673.72136.11109.04
Add product /wp-admin/post-new.php?post_type=h_product2,9018.41261.06154.73
System Status /wp-admin/edit.php?post_type=h_product&page=hubaga-status1,0822.3661.3764.10
Orders /wp-admin/edit.php?post_type=h_order1,5432.6964.9468.52
Settings /wp-admin/edit.php?post_type=h_product&page=hubaga-settings2,8843.67143.54105.17

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_widget_product_title

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=h_product&page=hubaga-status
    • > Notice in wp-includes/functions.php+471
    A non well formed numeric value encountered

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 13× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/hubaga/includes/admin/elements/reports_header.php
    • > /wp-content/plugins/hubaga/includes/elementa/elements/alert.php
    • > /wp-content/plugins/hubaga/includes/admin/elements/tag.php
    • > /wp-content/plugins/hubaga/includes/elementa/elements/multiselect.php
    • > /wp-content/plugins/hubaga/includes/admin/elements/reports_footer.php
    • > /wp-content/plugins/hubaga/includes/elementa/elements/save.php
    • > /wp-content/plugins/hubaga/includes/elementa/elements/title.php
    • > /wp-content/plugins/hubaga/includes/elementa/elements/button.php
    • > /wp-content/plugins/hubaga/includes/admin/elements/reports_header1.php
    • > /wp-content/plugins/hubaga/includes/admin/elements/reports_cards.php
  • 196× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hubaga/includes/elementa/elements/switch.php on line 15
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/hubaga/includes/elementa/elements/button.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hubaga/includes/elementa/elements/checkbox.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hubaga/includes/elementa/elements/text.php on line 9
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/hubaga/includes/elementa/elements/radio.php on line 10
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/hubaga/includes/elementa/elements/search.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hubaga/includes/elementa/elements/color.php on line 12
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/hubaga/includes/elementa/elements/password.php on line 11
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/hubaga/includes/elementa/elements/text.php on line 10
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/hubaga/includes/elementa/elements/email.php on line 13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=h_product&page=hubaga-reports
    • > Console-api (severe) in unknown
    /wp-content/plugins/hubaga/includes/admin/assets/js/vue.min.js?ver=2.3.3 5:2106 Error: Invalid dimensions for plot, width = 0, height = 400at Canvas.resize (/wp-content/plugins/hubaga/includes/admin/assets/js/jquery.flot.js?ver=0.8.3:135:10)at new Canvas (/wp-content/plugins/hubaga/includes/admin/assets/js/jquery.flot.js?ver=0.8.3:114:8)at setupCanvases (/wp-content/plugins/hubaga/includes/admin/assets/js/jquery.flot.js?ver=0.8.3:1313:23)at new Plot (/wp-content/plugins/hubaga/includes/admin/assets/js/jquery.flot.js?ver=0.8.3:707:9)at Function.$.plot (/wp-content/plugins/hubaga/includes/admin/assets/js/jquery.flot.js?ver=0.8.3:3146:20)at a.mounted (/wp-content/plugins/hubaga/includes/admin/assets/js/admin.js?ver=1.0.0:10:5)at $e (/wp-content/plugins/hubaga/includes/admin/assets/js/vue.min.js?ver=2.3.3:6:10241)at Object.insert (/wp-content/plugins/hubaga/includes/admin/assets/js/vue.min.js?ver=2.3.3:7:25247)at w (/wp-content/plugins/hubaga/includes/admin/assets/js/vue.min.js?ver=2.3.3:8:5507)at vt.__patch__ (/wp-content/plugins/hubaga/includes/admin/assets/js/vue.min.js?ver=2.3.3:8:6635)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #9 (Earnings reports.) image missing
  • Screenshots: Add a description for screenshot #7 in hubaga/assets to your readme.txt
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

hubaga/hubaga.php 92% from 13 tests

This is the main PHP file of "Hubaga - Sell Digital Downloads" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.1" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin23,990 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript152,4932,76314,237
PHP752,2163,9107,361
CSS5362902,392

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity28.67
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes15.00%
Methods314
▷ Static methods61.91%
▷ Public methods27587.58%
▷ Protected methods278.60%
▷ Private methods123.82%
Functions140
▷ Named functions140100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin