Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.48MB] [CPU: ▼3.87ms] Passed 4 tests
Analyzing server-side resources used by PDF Password Protect
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.96 ▲0.50 | 37.44 ▲1.53 |
Dashboard /wp-admin | 3.79 ▲0.45 | 46.90 ▼11.58 |
Posts /wp-admin/edit.php | 3.84 ▲0.49 | 49.04 ▲2.17 |
Add New Post /wp-admin/post-new.php | 6.38 ▲0.49 | 90.17 ▼7.58 |
Media Library /wp-admin/upload.php | 3.72 ▲0.49 | 36.92 ▲4.77 |
PDF Password Protected /wp-admin/upload.php?page=gpls-psrpdf-password-protected-pdf-pdf-password-protected-page | 4.14 | 111.38 |
Server storage [IO: ▲2.36MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 312 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by PDF Password Protect
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,806 ▲71 | 14.74 ▲0.37 | 1.74 ▲0.05 | 39.40 ▼5.10 |
Dashboard /wp-admin | 2,209 ▲17 | 5.80 ▲0.86 | 137.32 ▲32.00 | 57.29 ▲12.89 |
Posts /wp-admin/edit.php | 2,095 ▲3 | 2.01 ▼0.02 | 39.06 ▼3.13 | 34.63 ▼5.36 |
Add New Post /wp-admin/post-new.php | 1,546 ▲21 | 18.46 ▼4.81 | 602.61 ▼58.84 | 51.98 ▼3.18 |
Media Library /wp-admin/upload.php | 1,394 ▲6 | 4.22 ▼0.02 | 93.85 ▼2.73 | 40.44 ▼4.25 |
PDF Password Protected /wp-admin/upload.php?page=gpls-psrpdf-password-protected-pdf-pdf-password-protected-page | 1,111 | 2.40 | 44.25 | 65.77 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
- 8× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/tuto5.php
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/tuto2.php
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/tuto1.php
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/makefont.php
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/tuto7.php
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/tuto4.php
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/tuto6.php
- > /wp-content/plugins/pdf-password-protect/vendor/setasign/fpdf/tutorial/tuto3.php
- 63× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'setasign\\Fpdi\\PdfParser\\Filter\\FilterInterface' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/PdfParser/Filter/Flate.php:16
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\CrossReference\\AbstractReader' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php:22
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/PdfParser/Type/PdfDictionary.php:20
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' not found in wp-content/plugins/pdf-password-protect/vendor/symfony/filesystem/Exception/InvalidArgumentException.php:17
- > PHP Fatal error
Uncaught Error: Class 'tFPDF' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/Tfpdf/FpdfTpl.php:20
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Polyfill\\Php80\\PhpToken' not found in wp-content/plugins/pdf-password-protect/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php:13
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/PdfParser/Type/PdfNumeric.php:16
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/PdfParser/Type/PdfArray.php:21
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php:16
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\FpdfTpl' not found in wp-content/plugins/pdf-password-protect/vendor/setasign/fpdi/src/Fpdi.php:23
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
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
Attributes that require attention:
- Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in pdf-password-protect/assets to your readme.txt
- Tags: You are using too many tags: 11 tag instead of maximum 10
pdf-password-protect/pdf-password-protect.php 92% from 13 tests
The primary PHP file in "PDF Password Protect" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Description: Please keep the plugin description shorter than 140 characters (currently 169 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected17,959 lines of code in 248 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 156 | 2,460 | 6,021 | 13,185 |
HTML | 59 | 72 | 0 | 3,257 |
JSON | 9 | 0 | 0 | 843 |
Markdown | 11 | 134 | 0 | 378 |
YAML | 2 | 18 | 0 | 220 |
XML | 2 | 5 | 7 | 47 |
CSS | 6 | 0 | 5 | 26 |
JavaScript | 3 | 0 | 6 | 3 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 17.24 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 342.00 |
Average method complexity | 3.53 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 26 | |
Interfaces | 10 | |
Traits | 5 | |
Classes | 99 | |
▷ Abstract classes | 5 | 5.05% |
▷ Concrete classes | 94 | 94.95% |
▷ Final classes | 4 | 4.26% |
Methods | 738 | |
▷ Static methods | 126 | 17.07% |
▷ Public methods | 577 | 78.18% |
▷ Protected methods | 124 | 16.80% |
▷ Private methods | 37 | 5.01% |
Functions | 61 | |
▷ Named functions | 46 | 75.41% |
▷ Anonymous functions | 15 | 24.59% |
Constants | 72 | |
▷ Global constants | 2 | 2.78% |
▷ Class constants | 70 | 97.22% |
▷ Public constants | 70 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
core/assets/dist/images/logo-icon-md.png | 0.91KB | 0.96KB | 0.00% |
vendor/xthiago/pdf-version-converter/tests/files/repo/image.png | 0.55KB | 0.10KB | ▼ 82.27% |
core/assets/dist/images/full-logo.png | 6.58KB | 3.86KB | ▼ 41.28% |
core/assets/dist/images/logo-icon-sm.png | 0.62KB | 0.72KB | 0.00% |
core/assets/dist/images/logo-icon-lg.png | 3.56KB | 2.72KB | ▼ 23.62% |