Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▼1.23MB] [CPU: ▼47.50ms] Passed 4 tests
A check of server-side resources used by CopySafe PDF Protection
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.75 ▼0.72 | 14.20 ▼35.42 |
Dashboard /wp-admin | 2.78 ▼0.52 | 16.20 ▼37.88 |
Posts /wp-admin/edit.php | 2.79 ▼0.57 | 17.74 ▼33.22 |
Add New Post /wp-admin/post-new.php | 2.78 ▼3.10 | 16.13 ▼83.49 |
Media Library /wp-admin/upload.php | 2.78 ▼0.44 | 15.47 ▼23.76 |
List Files /wp-admin/admin.php?page=wpcsp_list | 2.79 | 16.50 |
Settings /wp-admin/admin.php?page=wpcsp_settings | 2.79 | 17.68 |
Server storage [IO: ▲0.53MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
wpcsp_settings |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for CopySafe PDF Protection
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲64 | 14.48 ▲0.09 | 1.78 ▲0.03 | 48.23 ▼0.54 |
Dashboard /wp-admin | 2,228 ▲51 | 4.97 ▼0.69 | 90.19 ▼2.79 | 38.93 ▼5.11 |
Posts /wp-admin/edit.php | 2,139 ▲39 | 2.36 ▲0.33 | 35.86 ▼0.02 | 30.14 ▼6.28 |
Add New Post /wp-admin/post-new.php | 1,716 ▲184 | 22.54 ▼0.68 | 602.77 ▼78.36 | 28.31 ▼28.19 |
Media Library /wp-admin/upload.php | 1,434 ▲40 | 4.19 ▼0.02 | 88.06 ▼19.81 | 43.30 ▼1.78 |
List Files /wp-admin/admin.php?page=wpcsp_list | 898 | 1.97 | 26.77 | 31.84 |
Settings /wp-admin/admin.php?page=wpcsp_settings | 1,171 | 2.14 | 27.56 | 34.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/wp-copysafe-pdf/wp-copysafe-pdf.php+667
Undefined index: page
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpcsp_settings
- > Notice in wp-content/plugins/wp-copysafe-pdf/wp-copysafe-pdf.php+669
Undefined index: cspfilename
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpcsp_settings
- > Notice in wp-content/plugins/wp-copysafe-pdf/wp-copysafe-pdf.php+671
Undefined index: action
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpcsp_settings
- > Notice in wp-content/plugins/wp-copysafe-pdf/wp-copysafe-pdf.php+673
Undefined index: cspdel_nonce
- > GET request to /wp-admin/admin.php?page=wpcsp_list
- > Warning in wp-content/plugins/wp-copysafe-pdf/function.php+273
scandir(wp-content/uploads/copysafe-pdf/): failed to open dir: Permission denied
- > GET request to /wp-admin/admin.php?page=wpcsp_list
- > Warning in wp-content/plugins/wp-copysafe-pdf/function.php+273
scandir(): (errno 13): Permission denied
- > GET request to /wp-admin/admin.php?page=wpcsp_list
- > Warning in wp-content/plugins/wp-copysafe-pdf/function.php+275
Invalid argument supplied for foreach()
- > GET request to /wp-admin/admin.php?page=wpcsp_settings
- > Notice in wp-content/plugins/wp-copysafe-pdf/wp-copysafe-pdf.php+354
Undefined variable: latest_version
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 take a closer look at the following
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wp-copysafe-pdf/popup_load.php
- 5× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
include(WPCSP_PLUGIN_PATHmedia-upload.php): failed to open stream: No such file or directory in wp-content/plugins/wp-copysafe-pdf/popup_load.php on line 44
- > PHP Warning
include(): Failed opening 'WPCSP_PLUGIN_PATHmedia-upload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-copysafe-pdf/popup_load.php on line 44
- > PHP Warning
Use of undefined constant WPCSP_PLUGIN_URL - assumed 'WPCSP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-copysafe-pdf/popup_load.php on line 49
- > PHP Warning
Use of undefined constant WPCSP_PLUGIN_PATH - assumed 'WPCSP_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-copysafe-pdf/popup_load.php on line 44
- > PHP Warning
Use of undefined constant WPCSP_PLUGIN_URL - assumed 'WPCSP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-copysafe-pdf/popup_load.php on line 54
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
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
4 plugin tags: secure, prevent, protect, pdf
wp-copysafe-pdf/wp-copysafe-pdf.php Passed 13 tests
"CopySafe PDF Protection" version 1.29's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
115 characters long description:
This Wordpress plugin enables sites using CopySafe PDF to easily add protected PDF for display in the ArtisBrowser.
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
Good job! No executable or dangerous file extensions detected2,427 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 203 | 137 | 1,271 |
CSS | 3 | 62 | 44 | 517 |
JavaScript | 4 | 73 | 88 | 449 |
HTML | 3 | 23 | 0 | 190 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 6 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 35 | |
▷ Named functions | 35 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
10 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/help-24-30.png | 1.52KB | 1.19KB | ▼ 21.77% |
images/artistscope-logo48.png | 3.10KB | 1.78KB | ▼ 42.54% |
images/copysafepdfbutton.png | 2.96KB | 0.16KB | ▼ 94.50% |
images/artisbrowser256.png | 48.23KB | 11.98KB | ▼ 75.16% |
images/add_file.png | 1.02KB | 1.31KB | 0.00% |