77% updraftplus

Code Review | UpdraftPlus WordPress Backup Plugin

WordPress plugin UpdraftPlus WordPress Backup Plugin scored 77% from 54 tests.

About plugin

  • Plugin page: updraftplus
  • Plugin version: 1.22.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.9
  • WordPress version: 5.9.2
  • First release: May 22, 2012
  • Latest release: Mar 15, 2022
  • Number of updates: 1,738
  • Update frequency: every 2.1 days
  • Top authors: DavidAnderson (100%)

Code review

54 tests

User reviews

5969 reviews

Install metrics

3,000,000+ active / 76,232,585 total downloads

Benchmarks

Plugin footprint 81% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.05MB] [CPU: ▼278.29ms] 75% from 4 tests

A check of server-side resources used by UpdraftPlus WordPress Backup Plugin
Please have a look at the following items
  • RAM: Try to keep total memory usage under 10MB (currently 10.20MB on /wp-admin/options-general.php?page=updraftplus)
PageMemory (MB)CPU Time (ms)
Home /5.25 ▲1.7464.98 ▲5.68
Dashboard /wp-admin7.25 ▲3.8556.96 ▲20.95
Posts /wp-admin/edit.php7.25 ▲3.6183.10 ▲45.37
Add New Post /wp-admin/post-new.php9.97 ▲3.00113.66 ▼1,160.85
Media Library /wp-admin/upload.php7.25 ▲3.9646.45 ▲21.08
UpdraftPlus Backups /wp-admin/options-general.php?page=updraftplus10.20218.61

Server storage [IO: ▲25.77MB] [DB: ▲0.20MB] 33% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Illegal file modification detected: 3 files (0.24KB) outside of "wp-content/plugins/updraftplus/" and "wp-content/uploads/"
    • (new file) wp-content/updraft/.htaccess
    • (new file) wp-content/updraft/index.html
    • (new file) wp-content/updraft/web.config
  • The filesystem usage should be lower than 25MB (currently using 25.77MB)
Filesystem: 1,640 new files
Database: no new tables, 16 new options
New WordPress options
updraft_cloudfiles
updraft_dropbox
updraft_openstack
updraft_googlecloud
updraft_azure
updraft_s3generic
updraft_googledrive
updraft_backblaze
updraft_ftp
updraftplus_version
...

Browser metrics Passed 4 tests

UpdraftPlus WordPress Backup Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲7415.83 ▲0.196.02 ▼0.742.36 ▼0.20
Dashboard /wp-admin2,957 ▲996.20 ▲0.04126.61 ▼19.92163.84 ▼31.04
Posts /wp-admin/edit.php2,729 ▲593.23 ▼0.0263.08 ▼48.98146.59 ▼16.22
Add New Post /wp-admin/post-new.php1,671 ▼4820.83 ▲3.95460.54 ▲0.78145.34 ▼16.61
Media Library /wp-admin/upload.php1,742 ▲475.47 ▼0.07148.61 ▲4.52190.46 ▲1.45
UpdraftPlus Backups /wp-admin/options-general.php?page=updraftplus7,8017.36240.74271.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 16 options
    • updraft_openstack
    • updraft_updraftvault
    • updraft_googledrive
    • updraft_backblaze
    • updraft_dropbox
    • updraft_onedrive
    • updraft_webdav
    • updraft_azure
    • updraft_s3
    • updraft_sftp
    • ...

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 122× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/updraftplus/templates/wp-admin/settings/footer.php
    • > /wp-content/plugins/updraftplus/vendor/team-updraft/common-libs/src/updraft-tasks/class-updraft-task-options.php
    • > /wp-content/plugins/updraftplus/templates/wp-admin/settings/delete-and-restore-modals.php
    • > /wp-content/plugins/updraftplus/central/bootstrap.php
    • > /wp-content/plugins/updraftplus/includes/updraftcentral.php
    • > /wp-content/plugins/updraftplus/methods/remotesend.php
    • > /wp-content/plugins/updraftplus/includes/class-backup-history.php
    • > /wp-content/plugins/updraftplus/templates/wp-admin/notices/report.php
    • > /wp-content/plugins/updraftplus/templates/wp-admin/settings/exclude-modal.php
    • > /wp-content/plugins/updraftplus/includes/class-commands.php
  • 538× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Parser\\Message\\MessageParserInterface' not found in wp-content/plugins/updraftplus/vendor/guzzle/guzzle/src/Guzzle/Parser/Message/AbstractMessageParser.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\MonitoringEventsInterface' not found in wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src/Exception/IncalculablePayloadException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' not found in wp-content/plugins/updraftplus/vendor/symfony/process/Pipes/WindowsPipes.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Common\\AbstractHasDispatcher' not found in wp-content/plugins/updraftplus/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiProxy.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Endpoint\\UseDualstackEndpoint\\ConfigurationInterface' not found in wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src/Endpoint/UseDualstackEndpoint/Configuration.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/updraftplus/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Assetic\\Filter\\FilterInterface' not found in wp-content/plugins/updraftplus/vendor/kriswallsmith/assetic/src/Assetic/Filter/MinifyCssCompressorFilter.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Assetic\\Filter\\BaseNodeFilter' not found in wp-content/plugins/updraftplus/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\MonitoringEventsInterface' not found in wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/Exception/ConfigurationException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Common\\Exception\\RuntimeException' not found in wp-content/plugins/updraftplus/vendor/guzzle/guzzle/src/Guzzle/Service/Exception/ResponseClassException.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

updraftplus/updraftplus.php 92% from 13 tests

The main PHP file in "UpdraftPlus WordPress Backup Plugin" ver. 1.22.11 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected351,626 lines of code in 1,445 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,22128,93767,822160,171
PO File3267,80883,520136,687
JavaScript316,8347,54233,728
CSS321,67728110,588
Markdown451,72705,575
JSON597404,072
XML9198189
Bourne Shell3194176
Sass1280167
reStructuredText1352959
GLSL117055
HTML116041
Ant110134
YAML12025
m414422
Dockerfile18010
make1409
Perl1418
SVG1007
INI2003

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,463)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 277)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.95
▷ Minimum class complexity1.00
▷ Maximum class complexity1,463.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity277.00
Code structure
Namespaces151
Interfaces115
Traits20
Classes1,221
▷ Abstract classes725.90%
▷ Concrete classes1,14994.10%
▷ Final classes413.57%
Methods9,564
▷ Static methods8268.64%
▷ Public methods8,12084.90%
▷ Protected methods4344.54%
▷ Private methods1,01010.56%
Functions583
▷ Named functions18832.25%
▷ Anonymous functions39567.75%
Constants990
▷ Global constants35836.16%
▷ Class constants63263.84%
▷ Public constants632100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
100 compressed PNG files occupy 0.48MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/email.png1.10KB1.01KB▼ 7.65%
images/icons/cloudfiles.png1.73KB1.66KB▼ 4.50%
images/addons-images/sftp.png0.99KB0.99KB0.00%
includes/jstree/themes/default-dark/32px.png1.49KB1.53KB0.00%
images/addons-images/morefiles.png2.18KB2.33KB0.00%