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 successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.65MB] [CPU: ▼5.59ms] Passed 4 tests
Analyzing server-side resources used by Watermark PDF for WordPress and WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.13 ▲0.67 | 39.84 ▼4.31 |
Dashboard /wp-admin | 3.97 ▲0.62 | 48.57 ▼12.90 |
Posts /wp-admin/edit.php | 4.02 ▲0.66 | 53.12 ▲8.40 |
Add New Post /wp-admin/post-new.php | 6.55 ▲0.66 | 94.84 ▼7.98 |
Media Library /wp-admin/upload.php | 3.89 ▲0.66 | 37.99 ▲2.84 |
Settings /wp-admin/admin.php?page=gpls-wmpdf-watermark-pdf-settings-tab | 4.30 | 36.34 |
Single PDF Watermarker /wp-admin/admin.php?page=gpls-wmpdf | 4.22 | 39.46 |
Server storage [IO: ▲4.11MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 334 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Watermark PDF for WordPress and WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,819 ▲57 | 14.35 ▲0.13 | 1.78 ▲0.11 | 41.91 ▼2.56 |
Dashboard /wp-admin | 2,221 ▲44 | 5.55 ▼0.07 | 98.27 ▲5.50 | 38.00 ▼2.08 |
Posts /wp-admin/edit.php | 2,126 ▲26 | 1.94 ▼0.00 | 39.83 ▲3.03 | 37.19 ▲0.25 |
Add New Post /wp-admin/post-new.php | 1,550 ▲5 | 23.43 ▼1.68 | 611.36 ▼51.98 | 52.31 ▼0.92 |
Media Library /wp-admin/upload.php | 1,432 ▲29 | 4.18 ▼0.00 | 97.17 ▼5.34 | 41.21 ▼4.39 |
Settings /wp-admin/admin.php?page=gpls-wmpdf-watermark-pdf-settings-tab | 1,113 | 3.43 | 50.52 | 93.27 |
Single PDF Watermarker /wp-admin/admin.php?page=gpls-wmpdf | 1,945 | 3.95 | 61.01 | 33.67 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- This plugin cannot be uninstalled
- > Warning in wp-content/plugins/watermark-pdf/includes/class-pdf-watermark.php+151
rmdir(wp-content/uploads/gpls-wmpdf-watermark-pdf-assets): Directory not empty
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/admin.php?page=gpls-wmpdf-watermark-pdf-settings-tab
- > User deprecated in wp-content/plugins/watermark-pdf/vendor/symfony/process/Process.php+147
Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell.
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
Please fix the following items
- 65× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' not found in wp-content/plugins/watermark-pdf/vendor/symfony/process/Pipes/UnixPipes.php:23
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/watermark-pdf/vendor/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php:16
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' not found in wp-content/plugins/watermark-pdf/vendor/symfony/process/Exception/RuntimeException.php:19
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/watermark-pdf/vendor/setasign/fpdi/src/PdfParser/Type/PdfDictionary.php:20
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\CrossReference\\AbstractReader' not found in wp-content/plugins/watermark-pdf/vendor/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php:22
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/watermark-pdf/vendor/xthiago/pdf-version-converter/tests/Converter/GhostscriptConverterCommandTest.php:19
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Filesystem\\Exception\\IOExceptionInterface' not found in wp-content/plugins/watermark-pdf/vendor/symfony/filesystem/Exception/IOException.php:21
- > PHP Fatal error
Uncaught Error: Class 'FPDF' not found in wp-content/plugins/watermark-pdf/vendor/setasign/fpdf/tutorial/tuto1.php:4
- > PHP Fatal error
Uncaught Error: Interface 'setasign\\Fpdi\\PdfParser\\Filter\\FilterInterface' not found in wp-content/plugins/watermark-pdf/vendor/setasign/fpdi/src/PdfParser/Filter/Flate.php:16
- > PHP Fatal error
Uncaught Error: Class 'FPDF' not found in wp-content/plugins/watermark-pdf/vendor/setasign/fpdf/tutorial/tuto5.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in watermark-pdf/assets to your readme.txt
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
watermark-pdf/gpls-wmpdf-watermark-pdf.php 92% from 13 tests
This is the main PHP file of "Watermark PDF for WordPress and WooCommerce" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("watermark-pdf.php" instead of "gpls-wmpdf-watermark-pdf.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin18,358 lines of code in 252 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 158 | 2,415 | 5,853 | 13,708 |
HTML | 59 | 72 | 0 | 3,242 |
JSON | 8 | 0 | 0 | 745 |
Markdown | 10 | 116 | 0 | 334 |
YAML | 1 | 8 | 0 | 177 |
JavaScript | 9 | 26 | 129 | 99 |
XML | 1 | 2 | 0 | 27 |
CSS | 6 | 0 | 5 | 26 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 17.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 335.00 |
Average method complexity | 3.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 23 | |
Interfaces | 10 | |
Traits | 5 | |
Classes | 101 | |
▷ Abstract classes | 3 | 2.97% |
▷ Concrete classes | 98 | 97.03% |
▷ Final classes | 4 | 4.08% |
Methods | 751 | |
▷ Static methods | 153 | 20.37% |
▷ Public methods | 598 | 79.63% |
▷ Protected methods | 107 | 14.25% |
▷ Private methods | 46 | 6.13% |
Functions | 60 | |
▷ Named functions | 46 | 76.67% |
▷ Anonymous functions | 14 | 23.33% |
Constants | 64 | |
▷ Global constants | 3 | 4.69% |
▷ Class constants | 61 | 95.31% |
▷ Public constants | 61 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.02MB 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% |
core/assets/dist/images/logo-icon-lg.png | 3.56KB | 2.72KB | ▼ 23.62% |
core/assets/dist/images/logo-icon-sm.png | 0.62KB | 0.72KB | 0.00% |
vendor/xthiago/pdf-version-converter/tests/files/repo/image.png | 0.55KB | 0.10KB | ▼ 82.27% |
vendor/setasign/fpdf/tutorial/logo.png | 2.32KB | 2.26KB | ▼ 2.57% |