Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.14MB] [CPU: ▼3.84ms] Passed 4 tests
This is a short check of server-side resources used by B2 Private Files
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.13 | 36.66 ▼2.35 |
Dashboard /wp-admin | 3.44 ▲0.14 | 47.37 ▼2.45 |
Posts /wp-admin/edit.php | 3.56 ▲0.20 | 53.93 ▲2.19 |
Add New Post /wp-admin/post-new.php | 6.02 ▲0.14 | 95.76 ▼12.16 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 39.21 ▲1.60 |
Library (Private) /wp-admin/upload.php?page=b2-private-files-library-page | 3.38 | 34.01 |
Add New (Private) /wp-admin/upload.php?page=b2-private-files-upload-page | 3.34 | 34.46 |
Shortcodes /wp-admin/admin.php?page=b2-private-files-code-page | 3.31 | 31.71 |
B2 Private Files /wp-admin/options-general.php?page=b2-private-files-settings-page | 3.31 | 32.02 |
Server storage [IO: ▲0.32MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by B2 Private Files
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,884 ▲98 | 13.44 ▼0.95 | 7.31 ▲5.37 | 40.16 ▼7.24 |
Dashboard /wp-admin | 2,207 ▲27 | 5.57 ▼0.00 | 90.41 ▼0.88 | 41.17 ▼1.03 |
Posts /wp-admin/edit.php | 2,112 ▲9 | 2.03 ▲0.08 | 40.47 ▲6.17 | 36.78 ▼0.24 |
Add New Post /wp-admin/post-new.php | 1,535 ▲9 | 23.59 ▲0.57 | 620.16 ▼8.86 | 48.04 ▼0.31 |
Media Library /wp-admin/upload.php | 1,409 ▲9 | 4.18 ▼0.05 | 99.58 ▼5.66 | 44.22 ▲0.70 |
Library (Private) /wp-admin/upload.php?page=b2-private-files-library-page | 963 | 2.00 | 22.11 | 27.44 |
Add New (Private) /wp-admin/upload.php?page=b2-private-files-upload-page | 799 | 2.00 | 23.69 | 30.03 |
Shortcodes /wp-admin/admin.php?page=b2-private-files-code-page | 796 | 1.99 | 26.32 | 27.72 |
B2 Private Files /wp-admin/options-general.php?page=b2-private-files-settings-page | 819 | 2.00 | 23.34 | 26.13 |
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
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- 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 short smoke test looking for server-side errors
Please fix the following server-side errors
- 7 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=b2-private-files-settings-page
- > Notice in wp-content/plugins/b2-private-files/admin/class-b2-private-files-admin.php+172
Trying to access array offset on value of type bool
- > GET request to /wp-admin/upload.php?page=b2-private-files-library-page
- > Notice in wp-content/plugins/b2-private-files/includes/class-b2-library.php+210
Undefined index: apiUrl
- > GET request to /wp-admin/upload.php?page=b2-private-files-library-page
- > Notice in wp-content/plugins/b2-private-files/includes/class-b2-library.php+211
Undefined index: authorizationToken
- > GET request to /wp-admin/upload.php?page=b2-private-files-library-page
- > Notice in wp-content/plugins/b2-private-files/includes/class-b2-library.php+215
Trying to access array offset on value of type null
- > GET request to /wp-admin/upload.php?page=b2-private-files-library-page
- > Warning in wp-content/plugins/b2-private-files/includes/class-b2-library.php+215
Invalid argument supplied for foreach()
- > GET request to /wp-admin/admin.php?page=b2-private-files-code-page
- > Notice in wp-content/plugins/b2-private-files/admin/class-b2-private-files-admin.php+367
Undefined index: fileName
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/b2-private-files/public/partials/b2-private-files-public-display.php
- > /wp-content/plugins/b2-private-files/admin/partials/b2-private-files-admin-display.php
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/b2-private-files/admin/partials/show_file.php:2
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/b2-private-files/admin/private-files-table.php on line 4
- > PHP Fatal error
Uncaught Error: Class 'PrivateFiles_List_Table' not found in wp-content/plugins/b2-private-files/admin/partials/library_page.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/b2-private-files/admin/partials/code_page.php:2
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/b2-private-files/admin/private-files-table.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/b2-private-files/admin/partials/upload_page.php:8
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/b2-private-files/admin/private-files-table.php on line 4
- > 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 97% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Listing the contents of your B2 Bucket.), #2 (New menu item added alongside with standard Library)
b2-private-files/b2-private-files.php Passed 13 tests
The principal PHP file in "B2 Private Files" v. 1.0.2 is loaded by WordPress automatically on each request
59 characters long description:
Serve token-protected private files hosted in Backblaze B2.
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
Success! There were no dangerous files found in this plugin813 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 18 | 301 | 742 | 804 |
JavaScript | 3 | 4 | 54 | 9 |
CSS | 2 | 0 | 8 | 0 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 5.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 1.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 62 | |
▷ Static methods | 11 | 17.74% |
▷ Public methods | 57 | 91.94% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 8.06% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
3 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 2.56KB | 1.45KB | ▼ 43.23% |
assets/screenshot-2.png | 42.33KB | 11.94KB | ▼ 71.79% |
assets/screenshot-1.png | 193.48KB | 52.90KB | ▼ 72.66% |