71% wp-database-backup

Code Review | WP Database Backup - Unlimited Database & Files Backup by Backup for WP

WordPress plugin WP Database Backup - Unlimited Database & Files Backup by Backup for WP scored71%from 54 tests.

About plugin

  • Plugin page: wp-database-backup
  • Plugin version: 6.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 21, 2014
  • Latest release: Sep 22, 2023
  • Number of updates: 159
  • Update frequency: every 21.8 days
  • Top authors: walke.prashant (86.16%)databasebackup (14.47%)

Code review

54 tests

User reviews

83 reviews

Install metrics

50,000+ active /1,793,000 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.74MB] [CPU: ▼2.12ms] Passed 4 tests

An overview of server-side resources used by WP Database Backup - Unlimited Database & Files Backup by Backup for WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7441.32 ▲1.98
Dashboard /wp-admin4.08 ▲0.7748.33 ▼3.57
Posts /wp-admin/edit.php4.11 ▲0.7552.90 ▲5.65
Add New Post /wp-admin/post-new.php6.73 ▲0.8480.19 ▼9.89
Media Library /wp-admin/upload.php3.95 ▲0.7238.78 ▲3.02
Backups /wp-admin/admin.php?page=wp-database-backup3.8938.32

Server storage [IO: ▲3.64MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 144 new files
Database: no new tables, 13 new options
New WordPress options
wp_db_backup_destination_s3
wp_db_backup_destination_FTP
wp_db_backup_exclude_dir
widget_recent-posts
wp_db_backup_destination_Email
can_compress_scripts
widget_recent-comments
wp_db_backup_backup_type
wp_db_backup_backups_dir
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Database Backup - Unlimited Database & Files Backup by Backup for WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲12913.21 ▼1.201.66 ▼0.5439.73 ▼4.04
Dashboard /wp-admin2,256 ▲685.80 ▲0.93101.07 ▲1.4840.39 ▼2.87
Posts /wp-admin/edit.php2,136 ▲472.04 ▲0.0437.08 ▲2.9131.21 ▼1.78
Add New Post /wp-admin/post-new.php1,559 ▲4523.31 ▲5.78670.96 ▲77.6262.11 ▲8.17
Media Library /wp-admin/upload.php1,438 ▲504.22 ▲0.05106.71 ▲10.2646.25 ▲6.51
Backups /wp-admin/admin.php?page=wp-database-backup3,1252.5754.0954.22
Save Backups to /wp-admin/admin.php?page=wp-database-backup#tab_db_destination3,1312.2751.1242.25
Auto Scheduler /wp-admin/admin.php?page=wp-database-backup#tab_db_schedul3,1312.3448.7635.40
Settings /wp-admin/admin.php?page=wp-database-backup#tab_db_setting3,1332.3548.2338.27
Upgrade to Premium /wp-admin/admin.php?page=wp-database-backup#tab_db_upgrade3,1332.4049.7468.36
Help & Support /wp-admin/admin.php?page=wp-database-backup#tab_db_help3,1342.4350.2636.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 13 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • wp_db_backup_backup_type
    • wp_db_remove_local_backup
    • theysaidso_admin_options
    • wp_db_backup_exclude_dir
    • wp_db_backup_destination_s3
    • widget_recent-posts
    • wp_db_backup_destination_Email
    • db_upgraded
    • ...

Smoke tests 25% 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=wp-database-backup
    • > Warning in wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php+1161
    fileperms(): stat failed for wp-content/uploads/db-backup

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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-database-backup/assets/index.php
    • > /wp-content/plugins/wp-database-backup/assets/css/index.php
    • > /wp-content/plugins/wp-database-backup/assets/js/index.php
  • 73× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_AuditService.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-database-backup/includes/admin/Destination/Email/email-form.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_ReportsService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Cache' not found in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/cache/Google_MemcacheCache.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_BigqueryService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_YouTubeAnalyticsService.php:25
    • > PHP Fatal error
      require_once(): Failed opening required 'service/Google_Utils.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/auth/Google_OAuth2.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_GamesService.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-database-backup/includes/admin/Destination/Dropbox/dropbox-form.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/wp-database-backup/includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_PlusService.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #0, #0, #0, #0 in wp-database-backup/assets to your readme.txt
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

wp-database-backup/wp-database-backup.php 85% from 13 tests

The entry point to "WP Database Backup - Unlimited Database & Files Backup by Backup for WP" version 6.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/lang" does not exist

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
Success! There were no dangerous files found in this plugin64,000 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP1134,46216,20561,354
CSS428151,882
JavaScript66023475
SVG100288
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.77
▷ Minimum class complexity1.00
▷ Maximum class complexity558.00
Average method complexity1.21
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1,400
▷ Abstract classes50.36%
▷ Concrete classes1,39599.64%
▷ Final classes30.22%
Methods11,564
▷ Static methods820.71%
▷ Public methods11,50099.45%
▷ Protected methods90.08%
▷ Private methods550.48%
Functions43
▷ Named functions4297.67%
▷ Anonymous functions12.33%
Constants103
▷ Global constants7572.82%
▷ Class constants2827.18%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%
assets/images/wp-database-backup.png35.99KB10.86KB▼ 69.81%
assets/images/right-tick.png1.88KB0.71KB▼ 62.23%
assets/images/sort_asc.png0.16KB0.25KB0.00%