Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.01MB] [CPU: ▼8.14ms] Passed 4 tests
Server-side resources used by PDF.js Shortcode
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 36.87 ▼11.26 |
Dashboard /wp-admin | 3.31 ▲0.01 | 42.97 ▼5.58 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 46.98 ▲0.93 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 84.00 ▼16.63 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 35.18 ▲2.07 |
Server storage [IO: ▲7.85MB] [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: 482 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by PDF.js Shortcode
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.52 ▼0.91 | 4.07 ▲2.18 | 40.45 ▲0.72 |
Dashboard /wp-admin | 2,206 ▲18 | 4.84 ▼1.00 | 108.72 ▼9.18 | 39.34 ▼2.80 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.06 ▲0.05 | 41.39 ▲4.37 | 35.34 ▲1.48 |
Add New Post /wp-admin/post-new.php | 1,542 ▲9 | 18.28 ▼5.06 | 642.74 ▼48.56 | 59.39 ▼11.07 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.26 ▲0.12 | 97.37 ▼9.43 | 42.15 ▼1.08 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
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)
The smoke test was a success, however most plugin functionality was not tested
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 fix the following
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/pdfjs-shortcode/web/viewer.php
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pdfjs-shortcode/pdfjs-shortcode.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 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
7 plugin tags: pdfjs, chrome, shortcode, reader, mozilla...
pdfjs-shortcode/pdfjs-shortcode.php Passed 13 tests
This is the main PHP file of "PDF.js Shortcode" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
22 characters long description:
View pdf's with pdf.js
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin130,592 lines of code in 57 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 43 | 10,337 | 10,220 | 128,274 |
CSS | 1 | 241 | 26 | 1,734 |
PHP | 2 | 67 | 17 | 391 |
SVG | 10 | 0 | 0 | 191 |
Markdown | 1 | 1 | 0 | 2 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.08 |
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
66 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
web/images/toolbarButton-sidebarToggle-rtl.png | 0.22KB | 0.33KB | 0.00% |
web/images/secondaryToolbarButton-documentProperties@2x.png | 0.91KB | 1.34KB | 0.00% |
web/images/toolbarButton-zoomOut.png | 0.09KB | 0.12KB | 0.00% |
web/images/findbarButton-previous.png | 0.19KB | 0.31KB | 0.00% |
web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png | 0.45KB | 0.79KB | 0.00% |