Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.45ms] Passed 4 tests
A check of server-side resources used by FraudLabs Pro for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.62 ▼2.91 |
Dashboard /wp-admin | 3.31 ▲0.00 | 49.53 ▼2.49 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.07 ▼3.10 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 92.22 ▼5.28 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 31.89 ▲0.80 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for FraudLabs Pro for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.24 ▼0.12 | 1.71 ▲0.03 | 36.08 ▼6.99 |
Dashboard /wp-admin | 2,198 ▲17 | 5.64 ▲0.05 | 96.48 ▼19.72 | 41.62 ▼0.63 |
Posts /wp-admin/edit.php | 2,103 ▼0 | 1.95 ▼0.06 | 40.70 ▲0.88 | 35.62 ▼1.87 |
Add New Post /wp-admin/post-new.php | 1,526 ▼5 | 23.61 ▲0.54 | 600.27 ▼34.39 | 56.58 ▲6.54 |
Media Library /wp-admin/upload.php | 1,403 ▲6 | 4.18 ▲0.01 | 95.12 ▼13.17 | 42.28 ▼0.61 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/tests/bootstrap.php
- > /wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/example.php
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fraudlabs-pro-for-woocommerce/includes/flp-callback.php:9
- > PHP Warning
require_once(wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/example.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/tests/FraudValidationTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/tests/SmsVerificationTest.php:7
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/fraudlabs-pro-for-woocommerce/vendor/fraudlabspro/fraudlabspro-php/example.php on line 6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: fraudlabspro, fraud detection, fraud prevention, woocommerce fraud detection, woocommerce...
fraudlabs-pro-for-woocommerce/init.php 85% from 13 tests
The primary PHP file in "FraudLabs Pro for WooCommerce" version 2.18.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("fraudlabs-pro-for-woocommerce.php" instead of "init.php")
- Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
Code Analysis 97% from 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
No dangerous file extensions were detected3,525 lines of code in 25 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 18 | 562 | 433 | 3,109 |
Markdown | 1 | 67 | 0 | 189 |
JavaScript | 2 | 23 | 0 | 139 |
JSON | 2 | 0 | 0 | 74 |
CSS | 1 | 1 | 0 | 7 |
XML | 1 | 0 | 0 | 7 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 138)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.69 |
Average class complexity | 52.73 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 437.00 |
Average method complexity | 7.77 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 138.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 85 | |
▷ Static methods | 5 | 5.88% |
▷ Public methods | 73 | 85.88% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 12 | 14.12% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.00% |
Constants | 18 | |
▷ Global constants | 3 | 16.67% |
▷ Class constants | 15 | 83.33% |
▷ Public constants | 15 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/step-2.png | 4.88KB | 1.81KB | ▼ 62.92% |
assets/images/step-1.png | 4.04KB | 1.52KB | ▼ 62.47% |
assets/images/step-2-selected.png | 3.89KB | 1.82KB | ▼ 53.23% |
assets/images/logo_200.png | 4.23KB | 2.45KB | ▼ 42.05% |
assets/images/step-1-selected.png | 3.01KB | 1.35KB | ▼ 55.06% |