10% wptio-backups

Code Review | WPtools.io Cloud Backup & Restore Plugin

WordPress plugin WPtools.io Cloud Backup & Restore Plugin scored10%from 54 tests.

About plugin

  • Plugin page: wptio-backups
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2018
  • Latest release: Apr 4, 2018
  • Number of updates: 27
  • Update frequency: every 2.7 days
  • Top authors: ebrahimqnaibi (92.59%)hasanhalabi (11.11%)Otto42 (7.41%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /859 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+16
    Use of undefined constant WPTIO_UPLOAD_URL - assumed 'WPTIO_UPLOAD_URL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.88MB] [CPU: ▼54.81ms] Passed 4 tests

An overview of server-side resources used by WPtools.io Cloud Backup & Restore Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.89 ▼34.05
Dashboard /wp-admin2.12 ▼1.186.14 ▼46.06
Posts /wp-admin/edit.php2.12 ▼1.236.29 ▼45.64
Add New Post /wp-admin/post-new.php2.12 ▼3.767.29 ▼93.49
Media Library /wp-admin/upload.php2.12 ▼1.116.87 ▼27.65
Setting /wp-admin/admin.php?page=setting-website-proccess2.125.56

Server storage [IO: ▲2.88MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 38 new files
Database: 2 new tables, 6 new options
New tables
wp_wptio_restore
wp_wptio_backup
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WPtools.io Cloud Backup & Restore Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.65 ▼0.961.70 ▼0.0629.06 ▼12.46
Dashboard /wp-admin2,228 ▲374.95 ▼0.9597.10 ▼9.0277.56 ▲36.26
Posts /wp-admin/edit.php2,123 ▲312.07 ▲0.0736.35 ▼8.5241.63 ▲5.79
Add New Post /wp-admin/post-new.php1,699 ▲16622.61 ▼0.65758.98 ▲94.0941.84 ▼13.60
Media Library /wp-admin/upload.php1,413 ▲254.29 ▲0.0896.81 ▼0.9778.79 ▲33.61
Setting /wp-admin/admin.php?page=setting-website-proccess1,0551.8931.3866.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+16
    Use of undefined constant WPTIO_UPLOAD_URL - assumed 'WPTIO_UPLOAD_URL' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+16
    Use of undefined constant WPTIO_UPLOAD_URL - assumed 'WPTIO_UPLOAD_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+17
    Use of undefined constant WPTIO_PATCH_URL - assumed 'WPTIO_PATCH_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+18
    Use of undefined constant WPTIO_CONNECT_URL - assumed 'WPTIO_CONNECT_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+19
    Use of undefined constant WPTIO_RESTORE_URL - assumed 'WPTIO_RESTORE_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+20
    Use of undefined constant WPTIO_DISPATCH_URL - assumed 'WPTIO_DISPATCH_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+21
    Use of undefined constant WPTIO_ACTIVATION_URL - assumed 'WPTIO_ACTIVATION_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+22
    Use of undefined constant WPTIO_GENERATE_TOKEN - assumed 'WPTIO_GENERATE_TOKEN' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Warning in wp-content/plugins/wptio-backups/classes/wptio.config.php+23
    Use of undefined constant WPTIO_DOWNLOAD_URL - assumed 'WPTIO_DOWNLOAD_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=setting-website-proccess
    • > Notice in wp-content/plugins/wptio-backups/pages/wptio-settings.php+243
    Trying to access array offset on value of type bool

SRP 50% 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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wptio-backups/pages/wptio-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wptio-backups/pages/wptio-restore.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wptio-backups/pages/wptio-backup.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in wptio-backups/assets to your readme.txt
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wptio-backups/init.php 85% from 13 tests

"WPtools.io Cloud Backup & Restore Plugin" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 470 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wptio-backups.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected17,956 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,150419,114
JavaScript61,8791,7037,161
PHP124941021,667
Markdown16014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.67
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity4.84
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods32
▷ Static methods618.75%
▷ Public methods2165.62%
▷ Protected methods00.00%
▷ Private methods1134.38%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon/icon.png0.41KB0.31KB▼ 23.75%