Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
- The plugin cannot be installed
- > Error in wp-content/plugins/cua-backuprestore/cua-backup-restore.php+67
Uncaught Error: Call to undefined function switch_to_blog() in wp-content/plugins/cua-backuprestore/cua-backup-restore.php:67
Stack trace:
#0 wp-admin/includes/plugin.php(2318): include_once()
#1 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()
Server metrics [RAM: ▼0.01MB] [CPU: ▼6.76ms] Passed 4 tests
Analyzing server-side resources used by cua-backup-restore
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.62 ▼2.39 |
Dashboard /wp-admin | 3.31 ▼0.04 | 45.87 ▼13.17 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.62 ▼3.29 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 89.65 ▼8.18 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 31.59 ▼1.90 |
Server storage [IO: ▲1.13MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 83 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
cua-backup-restore: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.14 ▼1.30 | 1.71 ▲0.09 | 44.40 ▲5.37 |
Dashboard /wp-admin | 2,200 ▲12 | 5.83 ▲0.93 | 97.42 ▼10.21 | 37.43 ▼8.08 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.00 ▲0.01 | 38.87 ▼1.74 | 34.45 ▼2.30 |
Add New Post /wp-admin/post-new.php | 1,544 ▲7 | 18.29 ▲0.05 | 642.39 ▼2.53 | 72.73 ▲11.82 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.12 ▼0.06 | 92.74 ▼4.66 | 42.16 ▼3.96 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/cua-backuprestore/cua-backup-restore.php
- > /wp-content/plugins/cua-backuprestore/lib/cuabr-init.php
- 7× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Warning
include(CUABR_PLUGIN_PATHlib/get_upload_limits.php): failed to open stream: No such file or directory in wp-content/plugins/cua-backuprestore/lib/cuabr-main-page.php on line 7
- > PHP Warning
Use of undefined constant CUABR_PLUGIN_PATH - assumed 'CUABR_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cua-backuprestore/lib/build_recents_table.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/cua-backuprestore/lib/cuabr-main-page.php:12
- > PHP Warning
Use of undefined constant CUABR_PLUGIN_PATH - assumed 'CUABR_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cua-backuprestore/lib/cuabr-main-page.php on line 7
- > PHP Warning
include(CUABR_PLUGIN_PATHlib/get_upload_limits.php): failed to open stream: No such file or directory in wp-content/plugins/cua-backuprestore/lib/build_recents_table.php on line 2
- > PHP Warning
include(): Failed opening 'CUABR_PLUGIN_PATHlib/get_upload_limits.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cua-backuprestore/lib/build_recents_table.php on line 2
- > PHP Warning
include(): Failed opening 'CUABR_PLUGIN_PATHlib/get_upload_limits.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cua-backuprestore/lib/cuabr-main-page.php on line 7
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 96% from 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
3 plugin tags: restore, backup, multisite
cua-backuprestore/cua-backup-restore.php 92% from 13 tests
The main PHP file in "cua-backup-restore" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("cua-backuprestore.php" instead of "cua-backup-restore.php")
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
No dangerous file extensions were detected8,819 lines of code in 54 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 9 | 173 | 60 | 2,702 |
JavaScript | 16 | 579 | 516 | 2,177 |
PHP | 14 | 447 | 496 | 1,541 |
Sass | 5 | 181 | 21 | 1,497 |
HTML | 2 | 83 | 9 | 517 |
SVG | 3 | 1 | 3 | 193 |
Markdown | 1 | 45 | 0 | 112 |
JSON | 2 | 0 | 0 | 70 |
YAML | 1 | 0 | 0 | 8 |
Bourne Shell | 1 | 0 | 0 | 2 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
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 | 32 | |
▷ Named functions | 32 | 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
PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/yellow.png | 0.47KB | 0.44KB | ▼ 6.86% |
js/sweetalert-master/example/images/logo_big.png | 16.76KB | 5.65KB | ▼ 66.32% |
js/sweetalert-master/example/images/vs_icon@2x.png | 8.06KB | 3.51KB | ▼ 56.40% |
img/red.png | 0.63KB | 0.58KB | ▼ 8.15% |
img/help.png | 0.79KB | 0.72KB | ▼ 8.81% |