Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲1.92MB] [CPU: ▲2.35ms] Passed 4 tests
Analyzing server-side resources used by Gift Cards (Gift Vouchers and Packages) (WooCommerce Supported)
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.38 ▲1.91 | 54.76 ▲16.34 |
Dashboard /wp-admin | 5.25 ▲1.94 | 58.94 ▲1.51 |
Posts /wp-admin/edit.php | 5.28 ▲1.93 | 64.03 ▲12.24 |
Add New Post /wp-admin/post-new.php | 7.89 ▲2.01 | 90.71 ▼20.70 |
Media Library /wp-admin/upload.php | 5.14 ▲1.91 | 53.43 ▲17.68 |
All Gift Items /wp-admin/edit.php?post_type=wpgv_voucher_product | 5.20 | 53.42 |
Settings /wp-admin/admin.php?page=voucher-setting | 5.47 | 61.12 |
View Voucher Details /wp-admin/admin.php?page=view-voucher-details | 5.10 | 46.27 |
All Gift Cards /wp-admin/edit.php?post_type=voucher_template | 5.20 | 47.94 |
Gift Cards Categories /wp-admin/edit-tags.php?taxonomy=category_voucher_template&post_type=voucher_template | 5.09 | 47.99 |
Add New Template /wp-admin/admin.php?page=new-voucher-template | 5.13 | 50.72 |
Item Categories /wp-admin/edit-tags.php?taxonomy=wpgv_voucher_category&post_type=wpgv_voucher_product | 5.23 | 49.83 |
Voucher Templates /wp-admin/admin.php?page=voucher-templates | 5.06 | 46.11 |
Gift Voucher Orders /wp-admin/admin.php?page=vouchers-lists | 5.06 | 45.63 |
Server storage [IO: ▲10.89MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 802 new files
Database: 4 new tables, 8 new options
New tables |
---|
wp_giftvouchers_template |
wp_giftvouchers_setting |
wp_giftvouchers_list |
wp_giftvouchers_activity |
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
wpgv_demoimageurl |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
jal_db_version |
Browser metrics Passed 4 tests
A check of browser resources used by Gift Cards (Gift Vouchers and Packages) (WooCommerce Supported)
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,889 ▲128 | 14.39 ▲0.04 | 1.78 ▲0.15 | 38.87 ▲1.25 |
Dashboard /wp-admin | 2,280 ▲106 | 5.77 ▲0.18 | 88.23 ▼15.61 | 43.37 ▼4.13 |
Posts /wp-admin/edit.php | 2,188 ▲85 | 2.45 ▲0.43 | 35.74 ▼2.20 | 33.91 ▲2.74 |
Add New Post /wp-admin/post-new.php | 1,605 ▲79 | 23.58 ▲0.68 | 669.26 ▲54.60 | 36.73 ▼10.76 |
Media Library /wp-admin/upload.php | 1,489 ▲92 | 4.41 ▲0.22 | 106.97 ▲0.92 | 47.83 ▲3.79 |
All Gift Items /wp-admin/edit.php?post_type=wpgv_voucher_product | 1,163 | 2.24 | 37.80 | 27.84 |
Settings /wp-admin/admin.php?page=voucher-setting | 5,447 | 13.94 | 377.85 | 93.00 |
View Voucher Details /wp-admin/admin.php?page=view-voucher-details | 1,080 | 1.97 | 31.02 | 33.64 |
All Gift Cards /wp-admin/edit.php?post_type=voucher_template | 1,166 | 2.23 | 35.81 | 28.12 |
Gift Cards Categories /wp-admin/edit-tags.php?taxonomy=category_voucher_template&post_type=voucher_template | 1,364 | 2.18 | 31.89 | 37.43 |
Add New Template /wp-admin/admin.php?page=new-voucher-template | 1,217 | 3.40 | 48.10 | 36.25 |
Item Categories /wp-admin/edit-tags.php?taxonomy=wpgv_voucher_category&post_type=wpgv_voucher_product | 1,542 | 3.57 | 42.26 | 29.16 |
Voucher Templates /wp-admin/admin.php?page=voucher-templates | 1,154 | 1.95 | 30.61 | 28.06 |
Gift Voucher Orders /wp-admin/admin.php?page=vouchers-lists | 1,121 | 2.02 | 28.75 | 25.71 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Zombie tables detected upon uninstall: 4 tables
- wp_giftvouchers_list
- wp_giftvouchers_setting
- wp_giftvouchers_activity
- wp_giftvouchers_template
- This plugin does not fully uninstall, leaving 8 options in the database
- can_compress_scripts
- jal_db_version
- theysaidso_admin_options
- widget_recent-posts
- wpgv_demoimageurl
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+17
Undefined index: voucher_id
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+59
Trying to get property 'order_type' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+88
Trying to get property 'item_id' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+40
Trying to get property 'id' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+52
Trying to get property 'couponcode' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+53
Trying to get property 'voucheradd_time' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+54
Trying to get property 'status' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+55
Trying to get property 'voucherpdf_link' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+89
Trying to access array offset on value of type bool
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+111
Trying to get property 'buying_for' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+110
Trying to get property 'from_name' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+112
Trying to get property 'to_name' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+114
Trying to get property 'amount' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+115
Trying to get property 'message' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+141
Trying to get property 'shipping_type' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+144
Trying to get property 'firstname' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+144
Trying to get property 'lastname' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+145
Trying to get property 'email' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+146
Trying to get property 'address' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+147
Trying to get property 'postcode' of non-object
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+148
Trying to get property 'shipping_method' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+153
Trying to get property 'pay_method' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Notice in wp-content/plugins/gift-voucher/include/view_voucher_details.php+159
Trying to get property 'expiry' of non-object
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
Please fix the following
- 16× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
- > /wp-content/plugins/gift-voucher/vendor/setasign/fpdf/tutorial/tuto3.php
- > /wp-content/plugins/gift-voucher/vendor/stripe/stripe-php/update_certs.php
- > /wp-content/plugins/gift-voucher/vendor/sofort/examples/example.ideal.banks.php
- > /wp-content/plugins/gift-voucher/vendor/setasign/fpdf/tutorial/tuto1.php
- > /wp-content/plugins/gift-voucher/vendor/setasign/fpdf/tutorial/tuto5.php
- > /wp-content/plugins/gift-voucher/vendor/setasign/fpdf/tutorial/tuto2.php
- > /wp-content/plugins/gift-voucher/vendor/sofort/examples/example.ideal.php
- > /wp-content/plugins/gift-voucher/vendor/stripe/stripe-php/build.php
- > /wp-content/plugins/gift-voucher/vendor/setasign/fpdf/tutorial/tuto4.php
- > /wp-content/plugins/gift-voucher/vendor/sofort/examples/example.paycode.details.php
- 369× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/gift-voucher/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutBatchHeader.php:24
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/gift-voucher/vendor/stripe/stripe-php/lib/Source.php:44
- > PHP Warning
count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/gift-voucher/vendor/sofort/examples/example.transaction.php on line 74
- > PHP Fatal error
Uncaught Error: Interface 'PayPalHttp\\Serializer' not found in wp-content/plugins/gift-voucher/vendor/paypal/paypalhttp/lib/PayPalHttp/Serializer/Form.php:8
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/gift-voucher/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payee.php:17
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/gift-voucher/vendor/stripe/stripe-php/lib/Recipient.php:25
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/gift-voucher/vendor/paypal/paypal-checkout-sdk/samples/AuthorizeIntentExamples/../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/gift-voucher/vendor/paypal/paypal-checkout-sdk/samples/AuthorizeIntentExamples/AuthorizeOrder.php on line 5
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/gift-voucher/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccountToken.php:17
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/gift-voucher/vendor/stripe/stripe-php/lib/AlipayAccount.php:13
- > PHP Fatal error
Uncaught Error: Interface 'PayPal\\Handler\\IPayPalHandler' not found in wp-content/plugins/gift-voucher/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/RestHandler.php:20
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=view-voucher-details
- > Network (severe)
wp-content/plugins/gift-voucher/assets/img/pdf.png%20width= - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: Add descriptions for screenshots #13, #14 in gift-voucher/assets to your readme.txt
gift-voucher/gift-voucher.php Passed 13 tests
The primary PHP file in "Gift Cards (Gift Vouchers and Packages) (WooCommerce Supported)" version 4.3.6 is used by WordPress to initiate all plugin functionality
101 characters long description:
Let your customers buy gift cards/certificates for your services & products directly on your website.
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/gift-voucher/vendor/stripe/stripe-php/data/ca-certificates.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 517 | 41,570 | 78,377 | 42,509 |
JavaScript | 10 | 4,298 | 4,808 | 18,286 |
PO File | 12 | 5,001 | 6,930 | 9,238 |
HTML | 59 | 72 | 0 | 3,240 |
CSS | 9 | 467 | 17 | 3,061 |
SVG | 8 | 1 | 0 | 2,814 |
Markdown | 16 | 609 | 0 | 1,534 |
JSON | 14 | 0 | 0 | 1,171 |
XML | 8 | 11 | 0 | 224 |
YAML | 2 | 0 | 0 | 22 |
Ruby | 1 | 0 | 0 | 2 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 6.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 339.00 |
Average method complexity | 1.68 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 39 | |
Interfaces | 13 | |
Traits | 9 | |
Classes | 432 | |
▷ Abstract classes | 20 | 4.63% |
▷ Concrete classes | 412 | 95.37% |
▷ Final classes | 1 | 0.24% |
Methods | 3,599 | |
▷ Static methods | 289 | 8.03% |
▷ Public methods | 3,376 | 93.80% |
▷ Protected methods | 129 | 3.58% |
▷ Private methods | 94 | 2.61% |
Functions | 103 | |
▷ Named functions | 91 | 88.35% |
▷ Anonymous functions | 12 | 11.65% |
Constants | 646 | |
▷ Global constants | 18 | 2.79% |
▷ Class constants | 628 | 97.21% |
▷ Public constants | 628 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
29 PNG files occupy 1.34MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/style2.png | 11.22KB | 11.32KB | 0.00% |
assets/img/icon-mail-envelope.png | 3.56KB | 2.09KB | ▼ 41.48% |
assets/img/delivery-truck.png | 0.69KB | 0.70KB | 0.00% |
assets/img/info-icon.png | 3.03KB | 3.14KB | 0.00% |
assets/img/templates/png/template-voucher-lanscape-4.png | 53.32KB | 22.36KB | ▼ 58.06% |