Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.05MB] [CPU: ▼3.74ms] Passed 4 tests
Server-side resources used by Simple PDF Exporter
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 38.40 ▲2.66 |
Dashboard /wp-admin | 3.35 ▲0.05 | 43.08 ▼2.59 |
Posts /wp-admin/edit.php | 3.40 ▲0.05 | 42.99 ▼9.72 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 87.97 ▼5.32 |
Media Library /wp-admin/upload.php | 3.27 ▲0.05 | 37.42 ▲6.03 |
PDF Export /wp-admin/tools.php?page=simple_pdf_export_settings | 3.24 | 31.45 |
Server storage [IO: ▲38.88MB] [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 38.88MB)
Filesystem: 630 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Simple PDF Exporter
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.13 ▼1.27 | 2.19 ▲0.53 | 43.66 ▲2.24 |
Dashboard /wp-admin | 2,210 ▲22 | 4.80 ▼1.03 | 100.68 ▼4.52 | 38.71 ▼6.08 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.02 ▲0.06 | 35.49 ▼3.13 | 35.20 ▼1.88 |
Add New Post /wp-admin/post-new.php | 1,536 ▲8 | 23.16 ▲4.84 | 677.91 ▲44.55 | 64.06 ▲10.22 |
Media Library /wp-admin/upload.php | 1,389 ▲1 | 4.25 ▲0.08 | 94.02 ▼10.48 | 43.07 ▼2.54 |
PDF Export /wp-admin/tools.php?page=simple_pdf_export_settings | 841 | 2.04 | 24.42 | 26.26 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > Warning in wp-content/plugins/simple-pdf-exporter/simple-pdf-exporter.php+128
rmdir(wp-content/uploads/pdf-export//pdf): Directory not empty
- Zombie WordPress options detected upon uninstall: 6 options
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- 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)
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/masterminds/html5/bin/entities.php
- > /wp-content/plugins/simple-pdf-exporter/libs/pdfmerger/tcpdf/tools/tcpdf_addfont.php
- 182× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'FPDF' not found in wp-content/plugins/simple-pdf-exporter/libs/fpdi/src/FpdfTpl.php:19
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/Text.php:13
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Value\\CSSFunction' not found in wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/sabberworm/php-css-parser/src/Value/Color.php:10
- > PHP Warning
include(): Failed opening 'PDFMerger.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simple-pdf-exporter/libs/pdfmerger/sample.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/dompdf/dompdf/src/FrameDecorator/NullFrameDecorator.php:17
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php:11
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/dompdf/dompdf/src/Positioner/TableRow.php:16
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/phenx/php-font-lib/src/FontLib/Glyph/Outline.php:20
- > PHP Fatal error
Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/simple-pdf-exporter/libs/dompdf/vendor/sabberworm/php-css-parser/src/Property/CSSNamespace.php:11
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/simple-pdf-exporter/libs/fpdi/src/PdfParser/Type/PdfArray.php:21
- > 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 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
- Requires at least: Invalid plugin version format
simple-pdf-exporter/simple-pdf-exporter.php Passed 13 tests
This is the main PHP file of "Simple PDF Exporter" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
123 characters long description:
Export in a single PDF, all posts, a single one, or a custom post type. Requires at least 512MB of free RAM on your server.
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin97,832 lines of code in 407 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 377 | 11,408 | 31,875 | 95,204 |
Markdown | 14 | 444 | 0 | 1,466 |
JSON | 10 | 0 | 0 | 686 |
CSS | 3 | 94 | 36 | 416 |
YAML | 1 | 9 | 0 | 35 |
HTML | 1 | 0 | 0 | 17 |
SVG | 1 | 0 | 0 | 8 |
PHP code 0% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,349)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 499)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 52.71 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,349.00 |
Average method complexity | 5.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 499.00 |
Code structure | ||
---|---|---|
Namespaces | 47 | |
Interfaces | 11 | |
Traits | 2 | |
Classes | 257 | |
▷ Abstract classes | 14 | 5.45% |
▷ Concrete classes | 243 | 94.55% |
▷ Final classes | 0 | 0.00% |
Methods | 3,267 | |
▷ Static methods | 285 | 8.72% |
▷ Public methods | 2,436 | 74.56% |
▷ Protected methods | 760 | 23.26% |
▷ Private methods | 71 | 2.17% |
Functions | 53 | |
▷ Named functions | 22 | 41.51% |
▷ Anonymous functions | 31 | 58.49% |
Constants | 395 | |
▷ Global constants | 144 | 36.46% |
▷ Class constants | 251 | 63.54% |
▷ Public constants | 246 | 98.01% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
libs/dompdf/vendor/dompdf/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |