78% backup-backup

Code Review | Backup Migration

WordPress plugin Backup Migration scored78%from 54 tests.

About plugin

  • Plugin page: backup-backup
  • Plugin version: 1.3.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 67
  • Update frequency: every 16.3 days
  • Top authors: iclyde (55.22%)migrate (32.84%)backupsupport (14.93%)

Code review

54 tests

User reviews

891 reviews

Install metrics

90,000+ active /1,053,030 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.94MB] [CPU: ▲5.86ms] Passed 4 tests

A check of server-side resources used by Backup Migration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.45 ▲0.9956.28 ▲20.82
Dashboard /wp-admin4.29 ▲0.9458.40 ▼7.35
Posts /wp-admin/edit.php4.33 ▲0.9763.98 ▲14.86
Add New Post /wp-admin/post-new.php6.82 ▲0.9397.63 ▼2.55
Media Library /wp-admin/upload.php4.15 ▲0.9252.11 ▲18.49

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

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • There were 16 files (3.90KB) illegally modified outside of "wp-content/plugins/backup-backup/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (new file) wp-content/backup-migration-m6UWc1EbHL/background-errors.log
    • (new file) wp-content/backup-migration-m6UWc1EbHL/index.html
    • (new file) wp-content/backup-migration-m6UWc1EbHL/index.php
    • (new file) wp-content/backup-migration-config.php
    • (new file) wp-content/backup-migration-m6UWc1EbHL/backups/index.html
    • (new file) wp-content/backup-migration-m6UWc1EbHL/staging/.htaccess
    • (new file) wp-content/backup-migration-m6UWc1EbHL/backups/index.php
    • (new file) wp-content/backup-migration-m6UWc1EbHL/.htaccess
    • (new file) wp-content/backup-migration-m6UWc1EbHL/backups/.htaccess
    • ...
Filesystem: 315 new files
Database: no new tables, 12 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
analyst_cache
bmi_initial_installation_version
db_upgraded
BMI::STORAGE::LOCAL::PATH
widget_theysaidso_widget
widget_recent-comments
bmi_gdrive_banner_dismissed
widget_recent-posts
...

Browser metrics Passed 4 tests

Backup Migration: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /10,747 ▲8,00013.28 ▼0.993.48 ▲1.9244.79 ▲8.96
Dashboard /wp-admin2,481 ▲3045.68 ▲0.04100.39 ▲0.55103.30 ▲57.77
Posts /wp-admin/edit.php2,405 ▲3022.01 ▲0.0638.17 ▼2.1741.58 ▲7.57
Add New Post /wp-admin/post-new.php1,823 ▲29521.64 ▼1.47691.25 ▲66.5647.75 ▼7.50
Media Library /wp-admin/upload.php1,686 ▲2894.18 ▼0.06104.44 ▲4.4679.98 ▲37.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_recent-comments
    • _irb_h_bn_review
    • widget_theysaidso_widget
    • analyst_cache
    • bmi_initial_installation_version
    • can_compress_scripts
    • bmi_hotfixes
    • theysaidso_admin_options
    • widget_recent-posts
    • bmi_gdrive_banner_dismissed
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/backup-backup/includes/restore-batching.php
    • > /wp-content/plugins/backup-backup/analyst/templates/optin.php
    • > /wp-content/plugins/backup-backup/analyst/templates/forms/deactivate.php
    • > /wp-content/plugins/backup-backup/includes/cli-handler.php
    • > /wp-content/plugins/backup-backup/analyst/templates/optout.php
    • > /wp-content/plugins/backup-backup/analyst/templates/forms/install.php
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/backup-backup/analyst/src/Http/Requests/InstallRequest.php:14
    • > PHP Notice
      Undefined variable: pluginToInstall in wp-content/plugins/backup-backup/analyst/templates/forms/install.php on line 1
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\CacheContract' not found in wp-content/plugins/backup-backup/analyst/src/Cache/DatabaseCache.php:12
    • > PHP Notice
      Undefined variable: pencilImage in wp-content/plugins/backup-backup/analyst/templates/forms/deactivate.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/backup-backup/analyst/src/Http/Requests/ActivateRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\HttpClientContract' not found in wp-content/plugins/backup-backup/analyst/src/Http/WordPressHttpClient.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/backup-backup/analyst/src/Http/Requests/UninstallRequest.php:14
    • > PHP Notice
      Undefined variable: shieldImage in wp-content/plugins/backup-backup/analyst/templates/optout.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/backup-backup/analyst/src/Http/Requests/OptOutRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/backup-backup/analyst/src/Http/Requests/OptInRequest.php:18

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

backup-backup/backup-backup.php Passed 13 tests

This is the main PHP file of "Backup Migration" version 1.3.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
58 characters long description:
Most sophisticated backup & migration plugin for WordPress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected21,663 lines of code in 245 files:
LanguageFilesBlank linesComment linesLines of code
PHP1566,9774,65819,494
SVG772161,268
CSS61375779
JSON10063
JavaScript524359

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 112)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity56.63
▷ Minimum class complexity1.00
▷ Maximum class complexity782.00
Average method complexity5.88
▷ Minimum method complexity1.00
▷ Maximum method complexity112.00
Code structure
Namespaces24
Interfaces6
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods650
▷ Static methods599.08%
▷ Public methods48975.23%
▷ Protected methods294.46%
▷ Private methods13220.31%
Functions67
▷ Named functions3044.78%
▷ Anonymous functions3755.22%
Constants92
▷ Global constants8996.74%
▷ Class constants33.26%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
62 compressed PNG files occupy 0.38MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/happy-smile.png4.58KB2.89KB▼ 36.92%
admin/images/info-min.png0.35KB0.37KB0.00%
admin/images/logo-min.png0.44KB0.46KB0.00%
includes/banner/views/projects/usm/imgs/play-icon.png0.62KB0.60KB▼ 3.17%
admin/images/warning-red.png0.62KB0.65KB0.00%