Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- Install procedure had errors
- > Notice in wp-content/plugins/clearent-payments/main.php+11
Constant WP_DEBUG already defined
Server metrics [RAM: ▼1.86MB] [CPU: ▼179.77ms] Passed 4 tests
Analyzing server-side resources used by Clearent Payments
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.77 ▼1.06 | 4.29 ▼23.70 |
Dashboard /wp-admin | 1.79 ▼1.27 | 3.88 ▼31.91 |
Posts /wp-admin/edit.php | 1.79 ▼1.31 | 3.71 ▼27.83 |
Add New Post /wp-admin/post-new.php | 1.79 ▼3.64 | 3.51 ▼635.64 |
Media Library /wp-admin/upload.php | 1.79 ▼1.21 | 3.65 ▼19.09 |
Clearent Payments /wp-admin/options-general.php?page=clearent_option_group | 1.79 | 3.52 |
Server storage [IO: ▲0.49MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 42 new files
Database: 1 new table, 1 new option
New tables |
---|
wp_clearent_transaction |
New WordPress options |
---|
clearent_opts |
Browser metrics Passed 4 tests
A check of browser resources used by Clearent Payments
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,671 ▲70 | 15.98 ▲0.28 | 5.03 ▼1.00 | 74.18 ▼10.91 |
Dashboard /wp-admin | 2,935 ▲40 | 6.13 ▼0.03 | 124.10 ▼7.68 | 179.15 ▲10.94 |
Posts /wp-admin/edit.php | 2,745 ▲5 | 3.36 ▼0.01 | 61.16 ▼1.91 | 129.95 ▼12.25 |
Add New Post /wp-admin/post-new.php | 3,818 ▲77 | 19.18 ▲0.19 | 422.82 ▼35.16 | 179.13 ▲10.49 |
Media Library /wp-admin/upload.php | 1,757 ▲5 | 5.50 ▼0.02 | 144.77 ▼2.84 | 186.65 ▲0.82 |
Clearent Payments /wp-admin/options-general.php?page=clearent_option_group | 1,344 | 3.11 | 56.19 | 151.00 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/clearent-payments/main.php+11
Constant WP_DEBUG already defined
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=clearent_option_group
- > Notice in wp-content/plugins/clearent-payments/main.php+11
Constant WP_DEBUG already defined
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 items
- 8× PHP files trigger server errors when accessed directly:
- > script 'wp-content/plugins/clearent-payments/admin/options-general.php' not found or unable to stat
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clearent-payments/main.php:34
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/clearent-payments/admin/transaction_history.php:5
- > PHP Fatal error
Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/clearent-payments/admin/pages_using_plugin.php:9
- > PHP Notice
Undefined index: confirm in wp-content/plugins/clearent-payments/admin/clearent_clear_log.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/clearent-payments/admin/plugin_settings.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/clearent-payments/admin/debug_log.php:3
- > PHP Notice
Undefined index: redirect_url in wp-content/plugins/clearent-payments/admin/clearent_clear_log.php on line 13
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: pay buttons, hosted pay buttons, clearent, payments, e-commerce...
clearent-payments/main.php 85% from 13 tests
Analyzing the main PHP file in "Clearent Payments" version 1.9
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("clearent-payments.php" instead of "main.php")
- Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,529 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 203 | 90 | 1,563 |
JavaScript | 3 | 95 | 82 | 738 |
CSS | 4 | 47 | 31 | 228 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 31.67 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 130.00 |
Average method complexity | 7.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 59.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 30 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 29 | 96.67% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 3.33% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 100.00% |
Constants | 5 | |
▷ Global constants | 1 | 20.00% |
▷ Class constants | 4 | 80.00% |
▷ Public constants | 4 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/images/ui-bg_glass_75_dadada_1x400.png | 0.26KB | 0.16KB | ▼ 38.93% |
image/clearent-cards.png | 14.96KB | 5.56KB | ▼ 62.82% |
image/clearent.png | 1.71KB | 1.75KB | 0.00% |
image/clearent-warning.png | 0.68KB | 0.72KB | 0.00% |
image/clearent-lock.png | 0.26KB | 0.28KB | 0.00% |