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.03MB] [CPU: ▼3.58ms] Passed 4 tests
Analyzing server-side resources used by CSM Woocoomerce Shipping Plugin
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 38.23 ▼1.97 |
Dashboard /wp-admin | 3.33 ▲0.03 | 47.64 ▼0.29 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 45.22 ▼1.12 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 80.16 ▼10.93 |
Media Library /wp-admin/upload.php | 3.25 ▲0.03 | 34.56 ▲2.43 |
Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for CSM Woocoomerce Shipping Plugin
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.25 ▼0.33 | 1.74 ▲0.22 | 43.89 ▲4.59 |
Dashboard /wp-admin | 2,198 ▲17 | 5.61 ▼0.11 | 94.12 ▼9.66 | 42.14 ▼1.34 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 1.97 ▼0.02 | 37.48 ▲1.69 | 32.71 ▼3.92 |
Add New Post /wp-admin/post-new.php | 1,536 ▼1 | 23.00 ▲4.76 | 680.01 ▲83.04 | 61.26 ▼20.79 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.19 ▼0.03 | 92.52 ▼3.06 | 39.89 ▼4.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
Almost there! Just fix the following items
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/csm-shipping/includes/trackOrder.php
- > /wp-content/plugins/csm-shipping/csm-shipping.php
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/csm-shipping/includes/views/add-services.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/csm-shipping/includes/overview.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csm-shipping/includes/validateCartCheckout.php:67
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/csm-shipping/includes/views/enable-services.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
- Requires at least: The plugin version is formatted incorrectly
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin Dashboard), #2 (CSM shipping settings)
csm-shipping/csm-shipping.php Passed 13 tests
The entry point to "CSM Woocoomerce Shipping Plugin" version 1.0.0 is a PHP file that has certain tags in its header comment area
38 characters long description:
Custom Shipping Method for WooCommerce
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
No dangerous file extensions were detected1,723 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 204 | 90 | 1,167 |
CSS | 3 | 54 | 50 | 456 |
JavaScript | 2 | 34 | 43 | 100 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.17 |
Average class complexity | 9.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 1.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 21 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 21 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 17 | |
▷ Named functions | 17 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
4 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/assets/images/3.png | 1.70KB | 1.55KB | ▼ 9.12% |
screenshot-2.png | 53.25KB | 14.21KB | ▼ 73.32% |
includes/assets/images/csmlogo.png | 11.58KB | 4.05KB | ▼ 65.06% |
screenshot-1.png | 43.55KB | 12.81KB | ▼ 70.59% |