Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼0.67ms] Passed 4 tests
An overview of server-side resources used by BananaCrystal Payment Gateway
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 38.81 ▼2.06 |
Dashboard /wp-admin | 3.32 ▲0.02 | 47.99 ▼0.38 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 49.56 ▲0.20 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 94.13 ▼0.45 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 36.81 ▲1.81 |
Add Subscription Plan /wp-admin/admin.php?page=add-bc-subscription-plans | 3.27 | 37.45 |
Subscriptions/Transactions /wp-admin/admin.php?page=bc-subscriptions | 3.25 | 34.61 |
Manage Subscription Plans /wp-admin/admin.php?page=bc-subscription-plans | 3.25 | 32.49 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: 2 new tables, 6 new options
New tables |
---|
wp_banana_crystal_subscriptions |
wp_banana_crystal_subscription_plans |
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for BananaCrystal Payment Gateway
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,935 ▲200 | 13.50 ▼1.25 | 8.03 ▲6.21 | 38.33 ▼5.74 |
Dashboard /wp-admin | 2,233 ▲45 | 4.84 ▼0.03 | 110.66 ▲9.34 | 39.51 ▼4.41 |
Posts /wp-admin/edit.php | 2,119 ▲30 | 1.99 ▼0.06 | 39.87 ▼0.13 | 36.49 ▲0.12 |
Add New Post /wp-admin/post-new.php | 1,564 ▲31 | 18.32 ▼4.92 | 616.92 ▼63.92 | 59.18 ▲5.48 |
Media Library /wp-admin/upload.php | 1,412 ▲24 | 4.19 ▲0.01 | 98.72 ▲2.38 | 44.55 ▲1.13 |
Add Subscription Plan /wp-admin/admin.php?page=add-bc-subscription-plans | 1,587 | 6.53 | 140.87 | 61.98 |
Subscriptions/Transactions /wp-admin/admin.php?page=bc-subscriptions | 819 | 2.03 | 24.07 | 25.13 |
Manage Subscription Plans /wp-admin/admin.php?page=bc-subscription-plans | 822 | 2.06 | 26.05 | 27.63 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- The uninstall procedure failed, leaving 2 tables in the database
- wp_banana_crystal_subscriptions
- wp_banana_crystal_subscription_plans
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/bananacrystal-payment-gateway/public/partials/woocommerce-gateway-banana-crystal-public-display.php
- 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/bananacrystal-payment-gateway/admin/views/subscription_plans_front.php on line 59
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/bananacrystal-payment-gateway/admin/views/subscription_plans_front.php:60
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/bananacrystal-payment-gateway/admin/views/subscriptions_view.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bananacrystal-payment-gateway/cron.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function self_admin_url() in wp-content/plugins/bananacrystal-payment-gateway/admin/views/subscription_plans_view.php:3
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/bananacrystal-payment-gateway/admin/views/subscriptions_view.php on line 21
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/bananacrystal-payment-gateway/includes/class-banana-crystal-woocommerce.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/bananacrystal-payment-gateway/admin/views/add_subscription_plan_view.php:34
- > PHP Fatal error
Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/bananacrystal-payment-gateway/admin/views/current_subscription_front.php:58
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== bananacrystal-payment-gateway ===
)
bananacrystal-payment-gateway/woocommerce-gateway-banana-crystal.php 77% from 13 tests
The main PHP script in "BananaCrystal Payment Gateway" version 1.2.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Description: The description should be shorter than 140 characters (currently 203 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bananacrystal-payment-gateway.php" instead of "woocommerce-gateway-banana-crystal.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,076 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 20 | 232 | 632 | 1,068 |
CSS | 1 | 1 | 4 | 5 |
JavaScript | 1 | 2 | 27 | 3 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 4.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 1.64 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 47 | |
▷ Static methods | 2 | 4.26% |
▷ Public methods | 42 | 89.36% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 10.64% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/img/bananacrystal-logo.png | 10.50KB | 5.46KB | ▼ 48.01% |
public/img/bananacrystal-logo-square.png | 3.63KB | 2.25KB | ▼ 38.00% |