Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼5.47ms] Passed 4 tests
Analyzing server-side resources used by Primer MyData for Woocommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 33.83 ▼7.07 |
Dashboard /wp-admin | 3.31 ▼0.04 | 44.03 ▼8.31 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 44.78 ▲2.01 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 91.08 ▼8.49 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.21 ▲2.25 |
Server storage [IO: ▲38.37MB] [DB: ▲0.00MB] 67% from 3 tests
A short overview of filesystem and database impact
Please try to fix the following items
- Filesystem usage must be lower than 25MB (currently using 38.37MB)
Filesystem: 2,329 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Primer MyData for Woocommerce: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.37 ▼0.15 | 1.76 ▲0.06 | 37.71 ▼5.16 |
Dashboard /wp-admin | 2,195 ▲15 | 5.66 ▲0.04 | 83.14 ▼5.73 | 37.42 ▲0.65 |
Posts /wp-admin/edit.php | 2,100 ▼3 | 2.00 ▼0.03 | 38.86 ▼5.95 | 35.04 ▼1.01 |
Add New Post /wp-admin/post-new.php | 1,526 ▼5 | 23.79 ▲0.64 | 676.50 ▲66.52 | 54.03 ▲3.43 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.25 ▲0.05 | 110.75 ▲11.72 | 46.35 ▲3.75 |
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
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
The following issues need your attention
- 123× GET requests to PHP files return non-empty strings (only 10 are shown):
- > /wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/samples/Basic/20_Read_Ods.php
- > /wp-content/plugins/primer-mydata/includes/vendor/markbaker/complex/examples/testOperations.php
- > /wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/samples/Autofilter/10_Autofilter.php
- > /wp-content/plugins/primer-mydata/includes/vendor/dompdf/lib/php-css-parser/tests/quickdump.php
- > /wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/samples/Basic/24_Readfilter.php
- > /wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/samples/Basic/28_Iterator.php
- > /wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/samples/Chart/33_Chart_create_line.php
- > /wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/samples/Pdf/21_Pdf_TCPDF.php
- > /wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/samples/Chart/33_Chart_create_pie.php
- > /wp-content/plugins/primer-mydata/includes/vendor/markbaker/complex/examples/complexTest.php
- 4095× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Trying to access array offset on value of type float in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
- > PHP Notice
Trying to access array offset on value of type float in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
- > PHP Notice
Trying to access array offset on value of type int in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
- > PHP Notice
Trying to access array offset on value of type float in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php on line 3465
- > PHP Notice
Trying to access array offset on value of type float in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
- > PHP Fatal error
Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader' not found in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php:61
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php on line 3465
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php on line 3465
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/primer-mydata/includes/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php on line 3465
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Screenshots: These screenshots do not have images: #1 (Orders UI), #2 (Receipts UI), #3 (Receipt example), #4 (Automation UI), #5 (Email Template)
primer-mydata/primer.php 85% from 13 tests
The principal PHP file in "Primer MyData for Woocommerce" v. 4.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("primer-mydata.php" instead of "primer.php")
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis 0% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
It is important to fix the following items
- Do not distribute dangerous files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/primer-mydata/includes/vendor/phpqrcode/tools/merge.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 959 | 38,714 | 81,671 | 211,026 |
XML | 13 | 3 | 2 | 40,005 |
PO File | 121 | 14,925 | 19,577 | 33,842 |
Markdown | 55 | 3,406 | 0 | 13,478 |
JavaScript | 22 | 1,974 | 1,272 | 9,486 |
CSS | 68 | 638 | 1,331 | 6,638 |
JSON | 22 | 0 | 0 | 5,248 |
SVG | 3 | 1 | 1 | 1,638 |
Sass | 16 | 300 | 25 | 1,379 |
YAML | 18 | 112 | 21 | 474 |
C# | 10 | 45 | 1 | 318 |
HTML | 3 | 50 | 0 | 260 |
MSBuild script | 1 | 0 | 7 | 57 |
Bourne Again Shell | 1 | 6 | 3 | 24 |
Bourne Shell | 1 | 0 | 0 | 2 |
DOS Batch | 1 | 0 | 0 | 2 |
PHP code 0% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,016)
- Method cyclomatic complexity should be reduced to less than 100 (currently 651)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 35.36 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1,016.00 |
Average method complexity | 4.29 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 651.00 |
Code structure | ||
---|---|---|
Namespaces | 99 | |
Interfaces | 31 | |
Traits | 4 | |
Classes | 779 | |
▷ Abstract classes | 53 | 6.80% |
▷ Concrete classes | 726 | 93.20% |
▷ Final classes | 25 | 3.44% |
Methods | 8,690 | |
▷ Static methods | 1,173 | 13.50% |
▷ Public methods | 6,973 | 80.24% |
▷ Protected methods | 1,020 | 11.74% |
▷ Private methods | 697 | 8.02% |
Functions | 207 | |
▷ Named functions | 149 | 71.98% |
▷ Anonymous functions | 58 | 28.02% |
Constants | 1,404 | |
▷ Global constants | 115 | 8.19% |
▷ Class constants | 1,289 | 91.81% |
▷ Public constants | 1,277 | 99.07% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
105 PNG files occupy 1.10MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/vendor/phpqrcode/cache/frame_37.png | 0.27KB | 0.25KB | ▼ 7.89% |
includes/vendor/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png | 0.12KB | 0.14KB | 0.00% |
includes/vendor/phpoffice/phpspreadsheet/docs/assets/ClassDiagrams/Exports/ReaderWriter.png | 45.01KB | 14.75KB | ▼ 67.24% |
public/css/images/ui-icons_cc0000_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
includes/vendor/phpqrcode/cache/frame_4.png | 0.15KB | 0.14KB | ▼ 1.34% |