Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼3.90ms] Passed 4 tests
A check of server-side resources used by 2C2P Redirect API for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 37.64 ▼5.06 |
Dashboard /wp-admin | 3.32 ▲0.01 | 45.17 ▼3.24 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 44.80 ▼1.08 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 93.12 ▼6.22 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 35.13 ▼0.09 |
Server storage [IO: ▲0.33MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for 2C2P Redirect API for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,802 ▲67 | 13.23 ▼1.36 | 1.54 ▼0.24 | 37.83 ▼5.70 |
Dashboard /wp-admin | 2,211 ▲20 | 4.87 ▼1.02 | 98.70 ▼3.51 | 37.99 ▼3.51 |
Posts /wp-admin/edit.php | 2,094 ▲5 | 2.05 ▲0.00 | 39.15 ▲0.61 | 33.61 ▲2.02 |
Add New Post /wp-admin/post-new.php | 1,516 ▼12 | 17.67 ▼5.42 | 655.59 ▲25.21 | 68.70 ▲12.70 |
Media Library /wp-admin/upload.php | 1,384 ▼4 | 4.23 ▼0.02 | 95.04 ▼2.92 | 42.55 ▼1.50 |
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
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/2c2p-redirect-api-for-woocommerce/Includes/wc-2c2p-request-helper.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/2c2p-redirect-api-for-woocommerce/2c2p.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/2c2p-redirect-api-for-woocommerce/Includes/wc-2c2p-setting.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
- Screenshots: Please add images for these screenshots: #1 (Open the plugin's setting page and enter configuration setting field for 2c2p payment.), #2 (During checkout, customer can select 2C2P Payment and also select previously stored cards (if enabled stored card payment)), #3 (Customer shall be redirected to 2C2P's payment page, where they will be able to save their card (if enabled stored card payment)), #4 (Customer can see the payment result page.)
2c2p-redirect-api-for-woocommerce/2c2p.php 92% from 13 tests
Analyzing the main PHP file in "2C2P Redirect API for WooCommerce" version 7.0.3
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("2c2p-redirect-api-for-woocommerce.php" instead of "2c2p.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,357 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 252 | 50 | 1,252 |
Markdown | 1 | 13 | 0 | 57 |
JavaScript | 1 | 7 | 2 | 48 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.66 |
Average class complexity | 38.71 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 100.00 |
Average method complexity | 9.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 68.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 32 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 32 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 2 | 100.00% |
▷ Public constants | 2 | 100.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
4 PNG files occupy 0.25MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 55.03KB | 16.63KB | ▼ 69.78% |
screenshot-4.png | 78.79KB | 23.58KB | ▼ 70.07% |
screenshot-1.png | 61.71KB | 19.86KB | ▼ 67.82% |
screenshot-3.png | 63.83KB | 20.87KB | ▼ 67.30% |