Benchmarks
Plugin footprint 30% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.20MB] [CPU: ▼3.42ms] Passed 4 tests
Analyzing server-side resources used by Flow Payments
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.66 ▲0.20 | 39.21 ▼3.75 |
Dashboard /wp-admin | 3.50 ▲0.20 | 45.38 ▼3.01 |
Posts /wp-admin/edit.php | 3.61 ▲0.26 | 43.99 ▼4.72 |
Add New Post /wp-admin/post-new.php | 6.08 ▲0.20 | 98.43 ▲2.45 |
Media Library /wp-admin/upload.php | 3.42 ▲0.20 | 33.05 ▼2.19 |
Swell /wp-admin/admin.php?page=flow/flow-admin-page.php | 3.41 | 31.41 |
Server storage [IO: ▲1.20MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 145 new files
Database: 3 new tables, 6 new options
New tables |
---|
wp_swell_orders |
wp_swell_payment_form |
wp_swell_products |
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Flow Payments
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,005 ▲244 | 15.59 ▲1.21 | 170.74 ▲169.19 | 40.19 ▼4.01 |
Dashboard /wp-admin | 2,231 ▲54 | 5.50 ▼0.18 | 85.11 ▼32.72 | 34.07 ▼10.07 |
Posts /wp-admin/edit.php | 2,133 ▲33 | 2.01 ▼0.02 | 35.86 ▲1.96 | 34.87 ▲0.78 |
Add New Post /wp-admin/post-new.php | 1,556 ▲28 | 23.54 ▲0.50 | 646.12 ▼8.76 | 53.66 ▼7.62 |
Media Library /wp-admin/upload.php | 1,436 ▲36 | 4.24 ▲0.03 | 95.43 ▼0.67 | 41.17 ▲1.20 |
Orders /wp-admin/orders.php | 26 | 0.42 | 0.08 | 11.08 |
Products /wp-admin/products.php | 26 | 0.42 | 0.06 | 7.00 |
Settings /wp-admin/settings.php | 26 | 0.42 | 0.07 | 5.81 |
Swell /wp-admin/admin.php?page=flow/flow-admin-page.php | 809 | 2.03 | 23.60 | 29.72 |
Payment Form /wp-admin/payment-form-options.php.php | 26 | 0.42 | 0.12 | 10.75 |
Uninstaller [IO: ▲1.20MB] [DB: ▲0.08MB] 0% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the followingThe uninstall procedure failed, leaving 3 tables in the database This plugin does not fully uninstall, leaving 7 options in the database
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/flow-payments/uninstall.php+16
Undefined variable: wpdb
- The plugin did not uninstall correctly, leaving 145 files (1.20MB) in the plugin directory
- (new file) admin/js/plugin-name-admin.js
- (new file) admin/index.php
- (new file) admin/models/get_keys.php
- (new file) admin/pages/payment-form/form_options_controller.php
- (new file) admin/pages/orders/get_orders.php
- (new file) admin/pages/orders/orders.php
- (new file) admin/css/main.css
- (new file) README.txt
- (new file) admin/pages/payment-form/form_options.php
- (new file) admin/pages/orders/orders_controller.php
- ...
- wp_swell_orders
- wp_swell_products
- wp_swell_payment_form
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- recovery_mode_email_last_sent
Smoke tests 25% 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 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
The following issues need your attention
- 6× PHP files output text when accessed directly:
- > /wp-content/plugins/flow-payments/admin/index.php
- > /wp-content/plugins/flow-payments/admin/templates/no-keys.php
- > /wp-content/plugins/flow-payments/app/public/views/products.php
- > /wp-content/plugins/flow-payments/admin/pages/payment-form/form_options.php
- > /wp-content/plugins/flow-payments/app/public/views/purchase_success.php
- > /wp-content/plugins/flow-payments/library/stripe/stripe-php/build.php
- 115× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/lib/SingletonApiResource.php:5
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/tests/TransferTest.php:5
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/lib/Plan.php:5
- > PHP Notice
Undefined variable: results in wp-content/plugins/flow-payments/admin/pages/products/products.php on line 18
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/lib/Error/Authentication.php:5
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/flow-payments/admin/pages/payment-form/form_options.php on line 23
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/tests/AuthenticationErrorTest.php:5
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/tests/AccountTest.php:5
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/tests/BalanceTest.php:5
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/flow-payments/library/stripe/stripe-php/tests/BankAccountTest.php:5
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
- > GET request to /wp-admin/orders.php
- > Network (severe)
wp-admin/orders.php - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/products.php
- > Network (severe)
wp-admin/products.php - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/settings.php
- > Network (severe)
wp-admin/settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/payment-form-options.php.php
- > Network (severe)
wp-admin/payment-form-options.php.php - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% 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
These attributes need your attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== flow-payments ===
) - Screenshots: These screenshots require images: #1 (Welcom to Flow Payments.), #2 (This is the new menu items.), #3 (Fully customisable payment forms!), #4 (Add Products.)
flow-payments/swell.php 85% from 13 tests
"Flow Payments" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("flow-payments.php" instead of "swell.php")
- Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
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/flow-payments/library/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 | 116 | 971 | 1,005 | 4,993 |
CSS | 2 | 27 | 32 | 473 |
JavaScript | 5 | 43 | 52 | 305 |
Stylus | 1 | 76 | 29 | 295 |
Markdown | 2 | 136 | 0 | 213 |
JSON | 1 | 0 | 0 | 36 |
XML | 2 | 0 | 0 | 30 |
YAML | 2 | 3 | 0 | 18 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 3.06 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 36.00 |
Average method complexity | 1.48 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 86 | |
▷ Abstract classes | 5 | 5.81% |
▷ Concrete classes | 81 | 94.19% |
▷ Final classes | 0 | 0.00% |
Methods | 352 | |
▷ Static methods | 101 | 28.69% |
▷ Public methods | 317 | 90.06% |
▷ Protected methods | 21 | 5.97% |
▷ Private methods | 14 | 3.98% |
Functions | 18 | |
▷ Named functions | 17 | 94.44% |
▷ Anonymous functions | 1 | 5.56% |
Constants | 3 | |
▷ Global constants | 1 | 33.33% |
▷ Class constants | 2 | 66.67% |
▷ Public constants | 2 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.64MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 406.61KB | 177.00KB | ▼ 56.47% |
screenshot-3.png | 142.44KB | 48.50KB | ▼ 65.95% |
library/stripe/stripe-php/data/test.png | 0.09KB | 0.09KB | 0.00% |
screenshot-2.png | 22.86KB | 6.39KB | ▼ 72.03% |
screenshot-4.png | 65.41KB | 17.84KB | ▼ 72.72% |