57% wpvivid-backuprestore

Code Review | Migration, Backup, Staging - WPvivid

WordPress plugin Migration, Backup, Staging - WPvivid scored57%from 54 tests.

About plugin

  • Plugin page: wpvivid-backupres...
  • Plugin version: 0.9.93
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 4, 2019
  • Latest release: Nov 13, 2023
  • Number of updates: 250
  • Update frequency: every 7.1 days
  • Top authors: wpvivid (100%)

Code review

54 tests

User reviews

853 reviews

Install metrics

300,000+ active /5,622,317 total downloads

Benchmarks

Plugin footprint 46% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲10.30MB] [CPU: ▲66.90ms] 50% from 4 tests

A check of server-side resources used by Migration, Backup, Staging - WPvivid
Please fix the following
  • RAM: Total memory usage should be kept under 10MB (currently 13.94MB on /wp-admin/admin.php?page=wpvivid-cleaner)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 10.30MB on /wp-admin/admin.php?page=wpvivid-cleaner)
PageMemory (MB)CPU Time (ms)
Home /12.48 ▲9.0296.84 ▲56.93
Dashboard /wp-admin14.08 ▲10.77113.23 ▲64.43
Posts /wp-admin/edit.php14.13 ▲10.77118.20 ▲71.62
Add New Post /wp-admin/post-new.php16.59 ▲10.71172.03 ▲89.64
Media Library /wp-admin/upload.php13.94 ▲10.71111.12 ▲74.60
Database Snapshots /wp-admin/admin.php?page=wpvivid-snapshot-ex13.92103.21
Settings /wp-admin/admin.php?page=wpvivid-setting15.13127.96
Export & Import /wp-admin/admin.php?page=wpvivid-export-import13.9293.82
Staging /wp-admin/admin.php?page=wpvivid-staging13.96109.78
Backup & Restore /wp-admin/admin.php?page=WPvivid15.15114.65
Image Cleaner /wp-admin/admin.php?page=wpvivid-cleaner13.94117.94

Server storage [IO: ▲10.66MB] [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 found: 7 files (0.23KB) outside of "wp-content/plugins/wpvivid-backuprestore/" and "wp-content/uploads/"
    • (new file) wp-content/wpvividbackups/wpvivid_log/index.html
    • (new file) wp-content/wpvivid_staging/index.html
    • (new file) wp-content/wpvividbackups/.htaccess
    • (new file) wp-content/wpvivid_staging/.htaccess
    • (new file) wp-content/wpvividbackups/index.html
    • (new file) wp-content/wpvivid_uploads/Isolate/.empty
    • (new file) wp-content/wpvividbackups/wpvivid_log/.htaccess
Filesystem: 1,254 new files
Database: 3 new tables, 8 new options
New tables
wp_wpvivid_unused_uploads_files
wp_wpvivid_scan_result
wp_wpvivid_options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
wpvivid_current_running_staging_task
db_upgraded
wpvivid_check_htaccess_rule_free

Browser metrics Passed 4 tests

This is an overview of browser requirements for Migration, Backup, Staging - WPvivid
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲9814.24 ▼0.171.80 ▲0.2140.95 ▼7.00
Dashboard /wp-admin2,262 ▲885.52 ▼0.0086.25 ▼6.9137.42 ▼4.31
Posts /wp-admin/edit.php2,170 ▲731.95 ▼0.0740.47 ▲2.5936.63 ▲0.93
Add New Post /wp-admin/post-new.php1,579 ▲5220.79 ▼2.71649.44 ▼43.0348.35 ▼11.45
Media Library /wp-admin/upload.php1,473 ▲704.15 ▼0.0399.50 ▲0.9841.10 ▼5.22
Database Snapshots /wp-admin/admin.php?page=wpvivid-snapshot-ex1,2232.2637.1131.83
Settings /wp-admin/admin.php?page=wpvivid-setting6,3432.6966.3153.26
Export & Import /wp-admin/admin.php?page=wpvivid-export-import1,3192.4442.5632.67
Staging /wp-admin/admin.php?page=wpvivid-staging2,1602.4642.6825.94
Backup & Restore /wp-admin/admin.php?page=WPvivid6,3212.6961.9037.02
Image Cleaner /wp-admin/admin.php?page=wpvivid-cleaner1,4252.3833.0435.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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 without warnings or errors
    • > Notice in wp-content/plugins/wpvivid-backuprestore/uninstall.php+108
    Constant WPVIVID_MAIN_SCHEDULE_EVENT already defined
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_wpvivid_scan_result
    • wp_wpvivid_unused_uploads_files
    • wp_wpvivid_options
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • wpvivid_current_running_staging_task
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wpvivid_check_htaccess_rule_free

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpvivid-backuprestore/admin/partials/wpvivid-website-info-page-display.php
  • 776× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Common\\Model\\MultipartUpload\\UploadIdInterface' not found in wp-content/plugins/wpvivid-backuprestore/includes/lib/aws-sdk-php-2.8.31/src/Aws/Common/Model/MultipartUpload/AbstractUploadId.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WPvivid_Google_Service_Resource' not found in wp-content/plugins/wpvivid-backuprestore/includes/lib2/google-api-php-client/src/WPvivid/Google/Service/Drive/Resource/Revisions.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Iam\\Exception\\IamException' not found in wp-content/plugins/wpvivid-backuprestore/includes/lib/aws-sdk-php-2.8.31/src/Aws/Iam/Exception/InvalidCertificateException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpvivid-backuprestore/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Common\\HasDispatcherInterface' not found in wp-content/plugins/wpvivid-backuprestore/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiInterface.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\Exception\\S3Exception' not found in wp-content/plugins/wpvivid-backuprestore/includes/lib/aws-sdk-php-2.8.31/src/Aws/S3/Exception/InvalidPayerException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Enum' not found in wp-content/plugins/wpvivid-backuprestore/includes/lib/aws-sdk-php-2.8.31/src/Aws/S3/Enum/Permission.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WPvivid_Google_Model' not found in wp-content/plugins/wpvivid-backuprestore/includes/lib2/google-api-php-client/src/WPvivid/Google/Service/Drive/DriveFileContentHints.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'WPvividPsr\\Log\\LoggerInterface' not found in wp-content/plugins/wpvivid-backuprestore/vendor/monolog/monolog/src/Monolog/Logger.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WPvividMonolog\\TestCase' not found in wp-content/plugins/wpvivid-backuprestore/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php:20

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

readme.txt Passed 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
8 plugin tags: restore, duplicate, backup, migrate, cloud backup...

wpvivid-backuprestore/wpvivid-backuprestore.php 92% from 13 tests

The main PHP script in "Migration, Backup, Staging - WPvivid" version 0.9.93 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin193,460 lines of code in 1,165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,07026,11059,147171,758
JavaScript42102,3696,742
Markdown341,71005,756
CSS92851394,800
JSON37802,149
PO File29921,3362,056
XML5140125
YAML312065
make1409

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 154)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.31
▷ Minimum class complexity1.00
▷ Maximum class complexity918.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity154.00
Code structure
Namespaces104
Interfaces99
Traits5
Classes1,040
▷ Abstract classes454.33%
▷ Concrete classes99595.67%
▷ Final classes171.71%
Methods8,931
▷ Static methods5255.88%
▷ Public methods7,89688.41%
▷ Protected methods5095.70%
▷ Private methods5265.89%
Functions379
▷ Named functions12131.93%
▷ Anonymous functions25868.07%
Constants868
▷ Global constants40246.31%
▷ Class constants46653.69%
▷ Public constants466100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
51 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/images/locked.png1.19KB0.29KB▼ 75.33%
admin/partials/images/staging/staging.png2.11KB1.11KB▼ 47.55%
admin/partials/images/storage-dropbox.png4.11KB0.78KB▼ 81.00%
admin/partials/images/storage-amazon-s3.png3.98KB0.79KB▼ 80.09%
admin/partials/images/storage-amazon-s3(gray).png1.41KB0.79KB▼ 43.88%