Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.03MB] [CPU: ▼5.16ms] Passed 4 tests
Server-side resources used by Ni Purchase Order(PO) For WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 38.74 ▼0.49 |
Dashboard /wp-admin | 3.33 ▲0.03 | 42.43 ▼8.16 |
Posts /wp-admin/edit.php | 3.44 ▲0.09 | 54.43 ▲8.31 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 79.25 ▼9.46 |
Media Library /wp-admin/upload.php | 3.25 ▲0.03 | 31.34 ▼2.54 |
Dashboard /wp-admin/admin.php?page=niwoopo-dashboard | 3.30 | 35.80 |
Manage PO /wp-admin/admin.php?page=niwoopo-manage-po | 3.30 | 32.19 |
Setting /wp-admin/admin.php?page=niwoopo-setting | 3.38 | 28.90 |
Stock Report /wp-admin/admin.php?page=niwoopo-stock-report | 3.40 | 28.28 |
Server storage [IO: ▲11.44MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 382 new files
Database: 2 new tables, 6 new options
New tables |
---|
wp_niwoopo_detail |
wp_niwoopo_header |
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Ni Purchase Order(PO) For WooCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,831 ▲85 | 14.47 ▲0.17 | 1.92 ▲0.09 | 43.64 ▼3.88 |
Dashboard /wp-admin | 2,234 ▲43 | 5.83 ▲0.93 | 93.61 ▼22.64 | 40.42 ▼8.82 |
Posts /wp-admin/edit.php | 2,120 ▲34 | 2.01 ▼0.12 | 39.77 ▲5.35 | 35.45 ▼1.82 |
Add New Post /wp-admin/post-new.php | 1,558 ▲25 | 22.96 ▼0.14 | 640.59 ▼37.25 | 61.42 ▲10.15 |
Media Library /wp-admin/upload.php | 1,419 ▲34 | 4.22 ▼0.00 | 93.12 ▼14.58 | 42.62 ▼2.90 |
Dashboard /wp-admin/admin.php?page=niwoopo-dashboard | 970 | 1.84 | 28.11 | 57.86 |
Manage PO /wp-admin/admin.php?page=niwoopo-manage-po | 973 | 2.34 | 37.66 | 34.14 |
Setting /wp-admin/admin.php?page=niwoopo-setting | 1,090 | 1.87 | 28.29 | 26.20 |
Stock Report /wp-admin/admin.php?page=niwoopo-stock-report | 1,174 | 2.46 | 35.27 | 34.10 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- The uninstall procedure failed, leaving 2 tables in the database
- wp_niwoopo_header
- wp_niwoopo_detail
- Zombie WordPress options detected upon uninstall: 6 options
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- 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
The smoke test was a success, however most plugin functionality was not tested
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
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/lib/php-css-parser/tests/quickdump.php
- 135× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/src/Adapter/GD.php:24
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/lib/php-css-parser/tests/Sabberworm/CSS/RuleSet/LenientParsingTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/src/FrameReflower/Text.php:21
- > PHP Fatal error
Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/src/Adapter/CPDF.php:38
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/lib/php-svg-lib/src/Svg/Tag/ClipPath.php:13
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/lib/php-font-lib/src/FontLib/TrueType/Collection.php:21
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Glyph\\Outline' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/lib/php-font-lib/src/FontLib/Glyph/OutlineComposite.php:17
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/lib/php-css-parser/tests/Sabberworm/CSS/OutputFormatTest.php:27
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/src/Positioner/TableCell.php:19
- > PHP Fatal error
Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/ni-purchase-orderpo-for-woocommerce/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Property/Charset.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
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 important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Dashboard show sales report and key sale indicator), #2 (Add purchase order list), #3 (Add purchase order), #4 (Edit purchase order), #5 (Purchase order settings), #6 (Purchase order print.), #7 (Purchase order PDF.), #8 (Stock Report)
ni-purchase-orderpo-for-woocommerce/ni-purchase-order-for-woocommerce.php 92% from 13 tests
The main PHP script in "Ni Purchase Order(PO) For WooCommerce" version 1.2.1 is automatically included on every request by WordPress
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ni-purchase-orderpo-for-woocommerce.php" instead of "ni-purchase-order-for-woocommerce.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin57,038 lines of code in 289 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 208 | 9,095 | 15,533 | 52,182 |
CSS | 50 | 411 | 298 | 2,770 |
Markdown | 6 | 265 | 0 | 947 |
JavaScript | 7 | 203 | 57 | 658 |
XML | 6 | 3 | 2 | 194 |
JSON | 5 | 0 | 0 | 154 |
YAML | 4 | 19 | 2 | 86 |
SVG | 2 | 0 | 1 | 30 |
HTML | 1 | 0 | 0 | 17 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 36.32 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 797.00 |
Average method complexity | 4.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 33 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 191 | |
▷ Abstract classes | 12 | 6.28% |
▷ Concrete classes | 179 | 93.72% |
▷ Final classes | 0 | 0.00% |
Methods | 2,114 | |
▷ Static methods | 102 | 4.82% |
▷ Public methods | 1,830 | 86.57% |
▷ Protected methods | 210 | 9.93% |
▷ Private methods | 74 | 3.50% |
Functions | 15 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 15 | 100.00% |
Constants | 176 | |
▷ Global constants | 2 | 1.14% |
▷ Class constants | 174 | 98.86% |
▷ Public constants | 174 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.75MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-3.png | 72.58KB | 17.28KB | ▼ 76.20% |
admin/css/images/ui-icons_777777_256x240.png | 3.19KB | 3.49KB | 0.00% |
screenshot-4.png | 105.32KB | 26.42KB | ▼ 74.92% |
admin/css/images/ui-icons_444444_256x240.png | 3.19KB | 3.49KB | 0.00% |
screenshot-8.png | 109.78KB | 29.42KB | ▼ 73.20% |