Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼6.59ms] Passed 4 tests
Analyzing server-side resources used by PDF Catalog for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.27 ▼6.07 |
Dashboard /wp-admin | 3.35 ▲0.04 | 50.28 ▼8.44 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 51.72 ▼1.45 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 95.52 ▼10.40 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 40.11 ▲0.31 |
Server storage [IO: ▲27.53MB] [DB: ▲0.00MB] 67% from 3 tests
A short overview of filesystem and database impact
It is recommended to fix the following issues
- Try to limit filesystem usage to 25MB (currently using 27.53MB)
Filesystem: 863 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
This is an overview of browser requirements for PDF Catalog for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲44 | 14.28 ▼0.45 | 1.68 ▼0.09 | 38.86 ▼6.74 |
Dashboard /wp-admin | 2,211 ▲37 | 5.55 ▲0.01 | 87.19 ▼16.84 | 37.08 ▼6.89 |
Posts /wp-admin/edit.php | 2,116 ▲16 | 2.03 ▲0.04 | 39.57 ▲0.67 | 36.05 ▼1.66 |
Add New Post /wp-admin/post-new.php | 1,541 ▲15 | 23.04 ▲0.03 | 638.76 ▼46.22 | 50.73 ▼1.50 |
Media Library /wp-admin/upload.php | 1,416 ▲13 | 4.17 ▼0.06 | 101.22 ▼8.81 | 45.40 ▼3.61 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
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
Everything seems fine, however 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
Please take a closer look at the following
- 11× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/utils/index.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/utils/font_names.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/utils/font_collections.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/compress.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/view/template/getpdf.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/utils/TemplateUtils.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/utils/font_dump.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/qrcode/index.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/utils/font_coverage.php
- > /wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/qrcode/image.php
- 462× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'mPDF' not found in wp-content/plugins/pdf-catalog-for-woocommerce/mergePDF.php:16
- > PHP Warning
Illegal string offset 'ID' in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/classes/cssmgr.php on line 1355
- > PHP Warning
Illegal string offset 'ID' in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/classes/cssmgr.php on line 1302
- > PHP Fatal error
Uncaught Error: Class 'UCDN' not found in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/config_script2lang.php:5
- > PHP Warning
Illegal string offset 'LANG' in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/classes/cssmgr.php on line 1307
- > PHP Warning
Illegal string offset 'LANG' in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/classes/cssmgr.php on line 1355
- > PHP Fatal error
Uncaught Error: Class 'FPDF' not found in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/vendor/setasign/fpdi/fpdi_bridge.php:23
- > PHP Warning
Cannot assign an empty string to a string offset in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/classes/cssmgr.php on line 1302
- > PHP Warning
Illegal string offset 'LANG' in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/classes/cssmgr.php on line 1307
- > PHP Warning
Illegal string offset 'ID' in wp-content/plugins/pdf-catalog-for-woocommerce/pdf_data/mpdf_lib/classes/cssmgr.php on line 1302
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== PDF Catalog for WooCommerce===
) - Requires at least: The plugin version is formatted incorrectly
pdf-catalog-for-woocommerce/pdfcatalog.php 92% from 13 tests
The main PHP file in "PDF Catalog for WooCommerce" ver. 1.1.18 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("pdf-catalog-for-woocommerce.php" instead of "pdfcatalog.php")
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin102,121 lines of code in 321 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 176 | 7,379 | 9,077 | 93,762 |
JavaScript | 106 | 623 | 1,681 | 5,736 |
CSS | 28 | 228 | 394 | 2,362 |
JSON | 3 | 12 | 0 | 123 |
Markdown | 2 | 43 | 0 | 96 |
XML | 5 | 3 | 0 | 32 |
SQL | 1 | 0 | 0 | 10 |
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
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 8,314)
- Please reduce cyclomatic complexity of methods to less than 100 (currently 1,542)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 400.52 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 8,314.00 |
Average method complexity | 20.92 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1,542.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 44 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 44 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 882 | |
▷ Static methods | 70 | 7.94% |
▷ Public methods | 824 | 93.42% |
▷ Protected methods | 46 | 5.22% |
▷ Private methods | 12 | 1.36% |
Functions | 54 | |
▷ Named functions | 54 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 385 | |
▷ Global constants | 61 | 15.84% |
▷ Class constants | 324 | 84.16% |
▷ Public constants | 324 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
42 compressed PNG files occupy 0.51MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
view/stylesheet/ui/themes/base/images/ui-icons_2e83ff_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
view/stylesheet/ui/themes/ui-lightness/images/ui-icons_228ef1_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
view/stylesheet/ui/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.10KB | 0.17KB | 0.00% |
view/stylesheet/ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png | 0.10KB | 0.10KB | ▼ 5.71% |
view/stylesheet/ui/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png | 0.12KB | 0.16KB | 0.00% |