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.04MB] [CPU: ▼4.00ms] Passed 4 tests
This is a short check of server-side resources used by Order Approval with Attachment
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 32.18 ▼9.06 |
Dashboard /wp-admin | 3.34 ▲0.04 | 45.07 ▼2.40 |
Posts /wp-admin/edit.php | 3.39 ▲0.04 | 45.70 ▼1.71 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.04 | 88.84 ▼0.57 |
Media Library /wp-admin/upload.php | 3.26 ▲0.04 | 33.41 ▼2.82 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Order Approval with Attachment
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲43 | 14.44 ▼0.31 | 1.94 ▼0.47 | 44.24 ▼1.25 |
Dashboard /wp-admin | 2,209 ▲21 | 5.85 ▼0.03 | 109.17 ▼8.73 | 40.37 ▼9.36 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.99 ▼0.03 | 39.49 ▲2.85 | 38.11 ▲5.54 |
Add New Post /wp-admin/post-new.php | 1,541 ▲8 | 23.36 ▲0.18 | 628.58 ▼47.02 | 66.77 ▲7.22 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.22 ▼0.01 | 93.18 ▼21.38 | 43.31 ▼4.09 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/order-approval-with-attachment/admin/partials/sg-woocommerce-order-approval-with-attachment-admin-display.php
- > /wp-content/plugins/order-approval-with-attachment/public/partials/sg-woocommerce-order-approval-with-attachment-public-display.php
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/order-approval-with-attachment/includes/class-sg-order-approval-woocommerce-pro-payment-gateway.php:23
- > PHP Fatal error
Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/order-approval-with-attachment/includes/class-sg-order-approval-woocommerce-pro-wc-admin-order.php:6
- > PHP Fatal error
Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/order-approval-with-attachment/includes/class-sg-order-approval-woocommerce-pro-wc-customer-order.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/order-approval-with-attachment/includes/class-sg-order-approval-woocommerce-pro-wc_email.php:12
- > PHP Fatal error
Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/order-approval-with-attachment/includes/class-sg-order-approval-woocommerce-pro-wc-customer-order-approved.php:5
- > PHP Fatal error
Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/order-approval-with-attachment/includes/class-sg-order-approval-woocommerce-pro-wc-customer-order-rejected.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: order, order-with-attachment
order-approval-with-attachment/order-approval-with-attachment.php 85% from 13 tests
This is the main PHP file of "Order Approval with Attachment" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Requires at least: The required version number must match the one declared in readme.txt ("3.0" instead of "3.7")
- Description: The description should be shorter than 140 characters (currently 142 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,978 lines of code in 35 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 117 | 15 | 1,332 |
PHP | 26 | 450 | 1,036 | 1,180 |
CSS | 4 | 81 | 39 | 466 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 8.92 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 43.00 |
Average method complexity | 2.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 13 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 76 | |
▷ Static methods | 2 | 2.63% |
▷ Public methods | 71 | 93.42% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 6.58% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/css/chosen-sprite.png | 0.53KB | 0.88KB | 0.00% |
admin/css/chosen-sprite@2x.png | 0.72KB | 0.83KB | 0.00% |
public/img/file_upload.png | 8.60KB | 8.56KB | 0.47% |