Benchmarks
Plugin footprint 75% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- Install procedure validation failed for this plugin
- > Notice in wp-content/plugins/affiliates-referrals-for-woocommerce/index.php+26
Undefined variable: wpdb
Server metrics [RAM: ▲0.05MB] [CPU: ▼315.72ms] Passed 4 tests
An overview of server-side resources used by Affiliates Referral for WC
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.76 ▲0.24 | 58.77 ▲2.39 |
Dashboard /wp-admin | 3.49 ▲0.08 | 34.43 ▲0.46 |
Posts /wp-admin/edit.php | 3.72 ▲0.08 | 48.44 ▼2.59 |
Add New Post /wp-admin/post-new.php | 6.96 ▼0.02 | 97.59 ▼1,258.65 |
Media Library /wp-admin/upload.php | 3.37 ▲0.07 | 25.72 ▼2.10 |
Referral Edits /wp-admin/admin.php?page=aff-wc-referral-edits | 3.33 | 22.47 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Affiliates Referral for WC: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,823 ▲69 | 15.53 ▼0.13 | 5.67 ▼0.25 | 2.99 ▲0.32 |
Dashboard /wp-admin | 2,920 ▲62 | 6.10 ▼0.08 | 120.60 ▼19.51 | 219.59 ▼4.61 |
Posts /wp-admin/edit.php | 2,720 ▲35 | 3.24 ▲0.00 | 63.17 ▼4.19 | 143.90 ▼12.81 |
Add New Post /wp-admin/post-new.php | 1,715 ▼45 | 16.93 ▼6.00 | 477.88 ▲35.26 | 185.13 ▲10.83 |
Media Library /wp-admin/upload.php | 1,726 ▲28 | 5.54 ▲0.03 | 143.19 ▲0.46 | 193.84 ▼74.34 |
Referral Edits /wp-admin/admin.php?page=aff-wc-referral-edits | 1,004 | 2.37 | 54.03 | 188.25 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/affiliates-referrals-for-woocommerce/includes/index.php on line 4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/affiliates-referrals-for-woocommerce/includes/index.php on line 4
- > PHP Warning
require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/affiliates-referrals-for-woocommerce/includes/index.php on line 4
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 81% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Tags: There are too many tags (22 tag instead of maximum 10)
- Plugin Name: You should set the name of your plugin on the first line (
=== affiliates-referrals-for-woocommerce ===
) - Donate link: Please fix this invalid URI: ""
affiliates-referrals-for-woocommerce/index.php 92% from 13 tests
"Affiliates Referral for WC" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("affiliates-referrals-for-woocommerce.php" instead of "index.php")
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
Good job! No executable or dangerous file extensions detected325 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 128 | 23 | 325 |
PHP code Passed 2 tests
This is a very shot 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.36 |
Average class complexity | 29.50 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 49.00 |
Average method complexity | 4.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 15 | |
▷ Static methods | 15 | 100.00% |
▷ Public methods | 15 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 8 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshots/screenshot-1.png | 38.31KB | 17.78KB | ▼ 53.59% |
screenshots/screenshot-2.png | 42.55KB | 19.32KB | ▼ 54.59% |
assets/images/icon.png | 1.49KB | 0.89KB | ▼ 40.21% |