67% backwpup

Code Review | BackWPup - WordPress Backup Plugin

WordPress plugin BackWPup - WordPress Backup Plugin scored67%from 54 tests.

About plugin

  • Plugin page: backwpup
  • Plugin version: 4.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3
  • WordPress version: 6.3.1
  • First release: Jul 5, 2009
  • Latest release: Nov 22, 2023
  • Number of updates: 1,009
  • Update frequency: every 5.2 days
  • Top authors: danielhuesken (67.49%)darioinpsyde (9.42%)vanvox (7.63%)cocreation (4.86%)nullbyte (4.46%)

Code review

54 tests

User reviews

1005 reviews

Install metrics

600,000+ active /13,274,048 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.72MB] [CPU: ▲13.79ms] 75% from 4 tests

Server-side resources used by BackWPup - WordPress Backup Plugin
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,311.15ms on /wp-admin/admin.php?page=backwpup)
PageMemory (MB)CPU Time (ms)
Home /4.78 ▲1.3149.04 ▲6.33
Dashboard /wp-admin5.19 ▲1.8865.55 ▲16.91
Posts /wp-admin/edit.php5.24 ▲1.8863.68 ▲12.88
Add New Post /wp-admin/post-new.php7.72 ▲1.84112.47 ▲21.31
Media Library /wp-admin/upload.php5.09 ▲1.8651.84 ▲19.04
Add new job /wp-admin/admin.php?page=backwpupeditjob7.38101.14
Settings /wp-admin/admin.php?page=backwpupsettings5.9482.00
Jobs /wp-admin/admin.php?page=backwpupjobs5.9554.76
Backups /wp-admin/admin.php?page=backwpupbackups5.1447.84
Dashboard /wp-admin/admin.php?page=backwpup6.252,311.15
Logs /wp-admin/admin.php?page=backwpuplogs5.5276.99
About /wp-admin/admin.php?page=backwpupabout5.1544.72

Server storage [IO: ▲16.48MB] [DB: ▲0.03MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3,175 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for BackWPup - WordPress Backup Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲7914.28 ▼0.061.72 ▼0.0545.45 ▲3.61
Dashboard /wp-admin2,246 ▲685.61 ▲0.0295.95 ▼20.7042.00 ▼3.25
Posts /wp-admin/edit.php2,156 ▲532.04 ▲0.0338.86 ▼3.9735.85 ▼2.81
Add New Post /wp-admin/post-new.php1,569 ▲4323.20 ▼0.03628.77 ▼1.2749.56 ▼2.84
Media Library /wp-admin/upload.php1,451 ▲514.23 ▲0.03103.06 ▲6.0743.19 ▲2.63
Add new job /wp-admin/admin.php?page=backwpupeditjob1,2891.9331.6640.14
Settings /wp-admin/admin.php?page=backwpupsettings1,9952.2531.0133.46
Jobs /wp-admin/admin.php?page=backwpupjobs1,1351.8928.0029.15
Backups /wp-admin/admin.php?page=backwpupbackups1,1711.8728.9930.28
Dashboard /wp-admin/admin.php?page=backwpup4,11537.281,086.9770.07
Logs /wp-admin/admin.php?page=backwpuplogs1,1721.7837.8837.24
About /wp-admin/admin.php?page=backwpupabout1,5691.8029.3579.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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 | 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/backwpup/vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php
  • 2024× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/backwpup/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp112r1.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/backwpup/vendor/microsoft/microsoft-graph/src/Model/Directory.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/backwpup/vendor/microsoft/microsoft-graph/src/Model/MediaContentRatingIreland.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/backwpup/vendor/microsoft/microsoft-graph/src/Model/DefenderDetectedMalwareActions.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\PersistentObject' not found in wp-content/plugins/backwpup/vendor/rackspace/php-opencloud/lib/OpenCloud/Compute/Resource/Flavor.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Core\\Enum' not found in wp-content/plugins/backwpup/vendor/microsoft/microsoft-graph/src/Model/Enablement.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Core\\Enum' not found in wp-content/plugins/backwpup/vendor/microsoft/microsoft-graph/src/Model/DayOfWeek.php:29
    • > PHP Warning
      require_once(phing/Task.php): failed to open stream: No such file or directory in wp-content/plugins/backwpup/vendor/guzzle/guzzle/phing/tasks/GuzzlePearPharPackageTask.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\KoblitzPrime' not found in wp-content/plugins/backwpup/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp256k1.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\Service\ovaService' not found in wp-content/plugins/backwpup/vendor/rackspace/php-opencloud/lib/OpenCloud/Compute/Service.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: database backup, restore, backup, cloud backup, wordpress backup

backwpup/backwpup.php 92% from 13 tests

The entry point to "BackWPup - WordPress Backup Plugin" version 4.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Almost there! Just fix the following issues
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/backwpup/vendor/aws/aws-crt-php/run_tests.bat
261,154 lines of code in 3,078 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,97441,808180,176248,727
JSON55803,518
XSD392482,803
Markdown1945101,714
XML637111,184
JavaScript24147121991
C1025089882
C/C++ Header210538441
YAML166565370
reStructuredText4147170190
Bourne Shell5234183
GLSL117055
Ant110134
m414422
Bourne Again Shell15013
SVG10011
Dockerfile18010
INI2003
DOS Batch1202
CSS1001

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.67
▷ Minimum class complexity1.00
▷ Maximum class complexity679.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces296
Interfaces221
Traits41
Classes2,639
▷ Abstract classes28810.91%
▷ Concrete classes2,35189.09%
▷ Final classes1054.47%
Methods19,110
▷ Static methods1,98410.38%
▷ Public methods16,73187.55%
▷ Protected methods1,1095.80%
▷ Private methods1,2706.65%
Functions883
▷ Named functions29233.07%
▷ Anonymous functions59166.93%
Constants2,793
▷ Global constants1174.19%
▷ Class constants2,67695.81%
▷ Public constants2,62798.17%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
25 PNG files occupy 0.85MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/hgbtredhover.png9.48KB10.67KB0.00%
assets/images/imagesec.png10.18KB7.14KB▼ 29.84%
assets/images/current.png0.13KB0.21KB0.00%
assets/images/imagedata.png6.21KB3.27KB▼ 47.29%
assets/images/hgboxleft.png1.54KB1.85KB0.00%