Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼2.88ms] Passed 4 tests
An overview of server-side resources used by Paid Memberships Pro - Payfast Gateway Add On
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 33.28 ▼7.65 |
Dashboard /wp-admin | 3.32 ▲0.01 | 49.38 ▲2.80 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 48.39 ▲0.43 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 91.62 ▼4.71 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 35.13 ▲0.41 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Paid Memberships Pro - Payfast Gateway Add On
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,807 ▲45 | 14.25 ▼0.48 | 1.61 ▼0.01 | 36.48 ▼10.84 |
Dashboard /wp-admin | 2,195 ▲18 | 5.55 ▼0.11 | 91.28 ▲4.22 | 39.61 ▼1.05 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.96 ▼0.01 | 40.42 ▲2.00 | 42.86 ▲7.25 |
Add New Post /wp-admin/post-new.php | 1,535 ▼1 | 25.48 ▲2.23 | 630.75 ▼39.62 | 65.00 ▲12.84 |
Media Library /wp-admin/upload.php | 1,403 ▲6 | 4.20 ▲0.02 | 95.97 ▲1.27 | 42.29 ▲1.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking 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 fix the following
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pmpro-payfast/pmpro-payfast.php:13
- > PHP Fatal error
require_once(): Failed opening required 'PMPRO_DIR/classes/gateways/class.pmprogateway.php' (include_path='.:/usr/share/php') in wp-content/plugins/pmpro-payfast/classes/class.pmprogateway_payfast.php on line 12
- > PHP Warning
Use of undefined constant PMPRO_DIR - assumed 'PMPRO_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/pmpro-payfast/classes/class.pmprogateway_payfast.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/pmpro-payfast/services/payfast_itn_handler.php:14
- > PHP Warning
require_once(PMPRO_DIR/classes/gateways/class.pmprogateway.php): failed to open stream: No such file or directory in wp-content/plugins/pmpro-payfast/classes/class.pmprogateway_payfast.php on line 12
- > PHP Fatal error
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 Passed 29 tests
readme.txt Passed 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
5 plugin tags: payfast, paid memberships pro, credit card, gateway, pmpro
pmpro-payfast/pmpro-payfast.php Passed 13 tests
The main file in "Paid Memberships Pro - Payfast Gateway Add On" v. 1.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
Adds PayFast as a gateway option for Paid Memberships Pro.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,003 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 198 | 314 | 1,003 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 40.00 |
▷ Minimum class complexity | 40.00 |
▷ Maximum class complexity | 40.00 |
Average method complexity | 3.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 16 | |
▷ Static methods | 11 | 68.75% |
▷ Public methods | 16 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 21 | |
▷ Named functions | 21 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 29 | |
▷ Global constants | 29 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/payfast_logo.png | 12.40KB | 4.33KB | ▼ 65.07% |