Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼8.57ms] Passed 4 tests
Analyzing server-side resources used by PDF Viewer Block for Gutenberg
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 44.72 ▲4.22 |
Dashboard /wp-admin | 3.32 ▼0.03 | 49.63 ▼13.42 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 51.74 ▲1.98 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.01 | 87.41 ▼18.99 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 35.14 ▼3.84 |
Server storage [IO: ▲15.95MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 391 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
PDF Viewer Block for Gutenberg: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲18 | 14.20 ▼0.15 | 1.86 ▲0.13 | 44.72 ▲5.66 |
Dashboard /wp-admin | 2,192 ▲21 | 5.50 ▼0.07 | 84.40 ▼3.16 | 39.84 ▼7.10 |
Posts /wp-admin/edit.php | 2,100 ▼3 | 1.99 ▲0.01 | 35.36 ▼5.76 | 33.62 ▼6.21 |
Add New Post /wp-admin/post-new.php | 6,194 ▲4,666 | 19.02 ▼4.09 | 929.78 ▲291.92 | 55.32 ▼5.38 |
Media Library /wp-admin/upload.php | 1,397 ▼6 | 4.20 ▼0.01 | 98.29 ▼0.13 | 43.40 ▼0.60 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pdf-viewer-block/public/public.php:22
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 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
9 plugin tags: liseuse, reader, pdf reader, block, pdf...
pdf-viewer-block/pdf-viewer-block.php Passed 13 tests
Analyzing the main PHP file in "PDF Viewer Block for Gutenberg" version 1.1
88 characters long description:
A simple and 100% free Gutenberg Block to display PDF Viewers / Readers on your website.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected50,706 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 8 | 4,418 | 4,311 | 48,371 |
CSS | 3 | 239 | 26 | 1,741 |
HTML | 1 | 49 | 17 | 353 |
SVG | 10 | 0 | 0 | 166 |
PHP | 4 | 10 | 59 | 62 |
JSON | 1 | 0 | 0 | 13 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
70 compressed PNG files occupy 0.47MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/pdfjs/web/images/secondaryToolbarButton-firstPage.png | 0.17KB | 0.27KB | 0.00% |
inc/pdfjs/web/images/toolbarButton-print@2x.png | 0.45KB | 0.63KB | 0.00% |
inc/pdfjs/web/images/toolbarButton-menuArrows@2x.png | 0.15KB | 0.19KB | 0.00% |
inc/pdfjs/web/images/toolbarButton-pageUp@2x.png | 0.39KB | 0.64KB | 0.00% |
inc/pdfjs/web/images/toolbarButton-bookmark@2x.png | 0.25KB | 0.41KB | 0.00% |