68% wp-backitup

Code Review | Backup and Restore WordPress - Backup Plugin

WordPress plugin Backup and Restore WordPress - Backup Plugin scored68%from 54 tests.

About plugin

  • Plugin page: wp-backitup
  • Plugin version: 1.43
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 6, 2012
  • Latest release: Aug 15, 2022
  • Number of updates: 485
  • Update frequency: every 7.3 days
  • Top authors: cssimmon (74.64%)jcpeden (25.57%)

Code review

54 tests

User reviews

293 reviews

Install metrics

10,000+ active /663,510 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.57MB] [CPU: ▲1.93ms] Passed 4 tests

A check of server-side resources used by Backup and Restore WordPress - Backup Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1344.86 ▼2.47
Dashboard /wp-admin5.39 ▲2.0562.16 ▼10.51
Posts /wp-admin/edit.php5.44 ▲2.0966.82 ▲5.67
Add New Post /wp-admin/post-new.php7.95 ▲2.07116.89 ▲15.01
Media Library /wp-admin/upload.php5.25 ▲2.0252.95 ▲15.20
Settings /wp-admin/admin.php?page=wp-backitup-settings5.3050.41
Backup /wp-admin/admin.php?page=wp-backitup-backup5.5456.95
Get Premium /wp-admin/admin.php?page=wp-backitup-about&tab=premium5.3746.73
Support /wp-admin/admin.php?page=wp-backitup-support6.1051.86
About /wp-admin/admin.php?page=wp-backitup-about5.3747.21

Server storage [IO: ▲2.62MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • Illegal file modification detected: 6 files (0.49KB) outside of "wp-content/plugins/wp-backitup/" and "wp-content/uploads/"
    • (new file) wp-content/wpbackitup_restore/index.html
    • (new file) wp-content/wpbackitup_backups/index.html
    • (new file) wp-content/wpbackitup_backups/.htaccess
    • (new file) wp-content/wpbackitup_restore/web.config
    • (new file) wp-content/wpbackitup_backups/web.config
    • (new file) wp-content/wpbackitup_restore/.htaccess
Filesystem: 115 new files
Database: 3 new tables, 12 new options
New tables
wp_wpbackitup_job_items
wp_wpbackitup_job_control
wp_wpbackitup_job_tasks
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
wp-backitup_major_version
widget_recent-posts
wp-backitup_logging
can_compress_scripts
theysaidso_admin_options
wp-backitup_db_version
wp-backitup_site_id
...

Browser metrics Passed 4 tests

Checking browser requirements for Backup and Restore WordPress - Backup Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8214.29 ▼0.321.87 ▲0.4243.71 ▼1.75
Dashboard /wp-admin2,252 ▲725.58 ▼0.0592.61 ▲0.0940.34 ▼9.06
Posts /wp-admin/edit.php2,154 ▲542.03 ▲0.0039.11 ▼1.9037.96 ▼2.75
Add New Post /wp-admin/post-new.php1,565 ▲3822.97 ▼0.13662.32 ▼41.5555.16 ▼3.60
Media Library /wp-admin/upload.php1,454 ▲544.15 ▼0.0397.49 ▼14.4644.24 ▼3.30
Settings /wp-admin/admin.php?page=wp-backitup-settings2,0546.2592.0653.59
Backup /wp-admin/admin.php?page=wp-backitup-backup1,9515.6498.1258.68
Get Premium /wp-admin/admin.php?page=wp-backitup-about&tab=premium1,3644.4649.70105.40
Support /wp-admin/admin.php?page=wp-backitup-support1,1404.6445.2265.92
About /wp-admin/admin.php?page=wp-backitup-about1,3124.4545.3987.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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 uninstall procedure failed, leaving 3 tables in the database
    • wp_wpbackitup_job_tasks
    • wp_wpbackitup_job_items
    • wp_wpbackitup_job_control
  • This plugin does not fully uninstall, leaving 12 options in the database
    • wp-backitup_major_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • wp-backitup_site_id
    • wp-backitup_db_version
    • theysaidso_admin_options
    • wp-backitup_logging
    • db_upgraded
    • wp-backitup_minor_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 33× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-backitup/lib/includes/class-encryption.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-job-scheduler.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-backup.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-license.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-database.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-job.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-api.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-loggerV2.php
    • > /wp-content/plugins/wp-backitup/wp-backitup.php
    • > /wp-content/plugins/wp-backitup/lib/includes/class-cleanup.php
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(WPBACKITUP__PLUGIN_PATH/lib/includes/class-filesystem.php): failed to open stream: No such file or directory in wp-content/plugins/wp-backitup/lib/background-processing/class-directory-cleanup-processor.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'WPBACKITUP__PLUGIN_PATH/lib/includes/class-filesystem.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-backitup/lib/background-processing/class-file-cleanup-processor.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WPBackItUp_Background_Process' not found in wp-content/plugins/wp-backitup/lib/background-processing/class-task-processor.php:15
    • > PHP Warning
      Use of undefined constant WPBACKITUP__PLUGIN_PATH - assumed 'WPBACKITUP__PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-backitup/lib/background-processing/class-cleanup-processor.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WPBackItUp_Background_Process' not found in wp-content/plugins/wp-backitup/lib/background-processing/class-cleanup-processor.php:18
    • > PHP Warning
      include_once(): Failed opening 'WPBACKITUP__PLUGIN_PATH/lib/includes/class-filesystem.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-backitup/lib/background-processing/class-cleanup-processor.php on line 4
    • > PHP Warning
      Use of undefined constant WPBACKITUP__PLUGIN_PATH - assumed 'WPBACKITUP__PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-backitup/lib/background-processing/class-directory-cleanup-processor.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'WPBACKITUP__PLUGIN_PATH/lib/includes/class-filesystem.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-backitup/lib/background-processing/class-directory-cleanup-processor.php on line 4
    • > PHP Warning
      Use of undefined constant WPBACKITUP__PLUGIN_PATH - assumed 'WPBACKITUP__PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-backitup/lib/background-processing/class-file-cleanup-processor.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WPBackItUp_Background_Process' not found in wp-content/plugins/wp-backitup/lib/background-processing/class-file-cleanup-processor.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

wp-backitup/wp-backitup.php Passed 13 tests

"Backup and Restore WordPress - Backup Plugin" version 1.43's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
Backup your content, settings, themes, plugins and media in just a few simple clicks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin14,966 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP514,7937,16314,943
JavaScript801917
CSS62246

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity43.64
▷ Minimum class complexity1.00
▷ Maximum class complexity351.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes25.13%
▷ Concrete classes3794.87%
▷ Final classes00.00%
Methods731
▷ Static methods8812.04%
▷ Public methods58880.44%
▷ Protected methods557.52%
▷ Private methods8812.04%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants110
▷ Global constants5045.45%
▷ Class constants6054.55%
▷ Public constants60100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
31 PNG files occupy 0.49MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/support_page.png64.57KB67.53KB0.00%
images/success.png0.82KB0.83KB0.00%
images/support_portal.png105.00KB50.66KB▼ 51.75%
css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
images/active_plugins_1.14.png17.57KB18.46KB0.00%