Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼143.54ms] Passed 4 tests
A check of server-side resources used by Registrations for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.87 ▲0.15 | 32.27 ▲12.76 |
Dashboard /wp-admin | 3.09 ▲0.03 | 44.71 ▲2.54 |
Posts /wp-admin/edit.php | 3.14 ▲0.03 | 41.90 ▲1.61 |
Add New Post /wp-admin/post-new.php | 5.45 ▲0.01 | 82.87 ▼574.47 |
Media Library /wp-admin/upload.php | 3.04 ▲0.03 | 27.61 ▼3.82 |
Server storage [IO: ▲0.67MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Registrations for WooCommerce: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,724 ▲118 | 15.89 ▲0.33 | 7.49 ▼0.43 | 48.40 ▲0.83 |
Dashboard /wp-admin | 2,994 ▲63 | 5.93 ▼0.19 | 146.85 ▲5.13 | 104.97 ▼1.36 |
Posts /wp-admin/edit.php | 2,762 ▲23 | 2.70 ▲0.02 | 67.83 ▲4.23 | 88.69 ▼0.23 |
Add New Post /wp-admin/post-new.php | 1,685 ▲185 | 19.00 ▲0.18 | 377.42 ▼1.54 | 106.04 ▼7.74 |
Media Library /wp-admin/upload.php | 1,831 ▲27 | 5.02 ▲0.01 | 146.40 ▼1.65 | 126.89 ▲4.92 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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 take a closer look at the following
- 10× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/registrations-for-woocommerce/includes/class-wc-registrations-checkout.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/registrations-for-woocommerce/includes/woo-includes/class-wc-dependencies.php:15
- > PHP Warning
include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/registrations-for-woocommerce/includes/class-wc-registrations-checkout.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/registrations-for-woocommerce/includes/reports/class-wc-reports-manager.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/registrations-for-woocommerce/includes/views/html-dates-view.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/registrations-for-woocommerce/includes/views/html-dates-variation-fields-view.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/registrations-for-woocommerce/includes/class-wc-registrations-admin.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/registrations-for-woocommerce/includes/class-wc-registrations-checkout.php:35
- > PHP Notice
Trying to get property 'ID' of non-object in wp-content/plugins/registrations-for-woocommerce/includes/views/html-dates-view.php on line 14
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/registrations-for-woocommerce/includes/class-wc-registrations-checkout.php on line 13
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: tickets, subscriptions, attendees, events, registrations...
registrations-for-woocommerce/registrations-for-woocommerce.php 92% from 13 tests
This is the main PHP file of "Registrations for WooCommerce" version 2.0.5, 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:
- Requires at least: The required version number did not match the one declared in readme.txt ("4.8.0" instead of "3.1")
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
Success! There were no dangerous files found in this plugin2,055 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 18 | 400 | 738 | 1,430 |
JavaScript | 2 | 69 | 97 | 296 |
PO File | 1 | 94 | 124 | 251 |
SVG | 1 | 9 | 1 | 40 |
Markdown | 1 | 17 | 0 | 38 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 17.64 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 45.00 |
Average method complexity | 3.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 76 | |
▷ Static methods | 51 | 67.11% |
▷ Public methods | 76 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
11 PNG files occupy 0.50MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-2.png | 64.15KB | 28.41KB | ▼ 55.72% |
assets/banner-772x250.png | 24.70KB | 11.55KB | ▼ 53.24% |
assets/banner-1544x500.png | 53.37KB | 23.80KB | ▼ 55.41% |
assets/screenshot-3.png | 70.97KB | 31.55KB | ▼ 55.54% |
assets/screenshot-6.png | 57.46KB | 26.02KB | ▼ 54.71% |