70% wp-mybackup

Code Review | WP MyBackup

WordPress plugin WP MyBackup scored70%from 54 tests.

About plugin

  • Plugin page: wp-mybackup
  • Plugin version: 1.0-3 $...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 13, 2015
  • Latest release: Feb 8, 2017
  • Number of updates: 47
  • Update frequency: every 14.9 days
  • Top authors: eugenmihailescu (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

40+ active /4,908 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.39MB] [CPU: ▼25.21ms] Passed 4 tests

Analyzing server-side resources used by WP MyBackup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.344.62 ▼38.16
Dashboard /wp-admin2.63 ▼0.7210.32 ▼56.14
Posts /wp-admin/edit.php3.67 ▲0.3147.64 ▲3.27
Add New Post /wp-admin/post-new.php6.14 ▲0.2584.69 ▼7.27
Media Library /wp-admin/upload.php3.48 ▲0.2634.92 ▲0.75
WP MyBackup /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a482.6411.40

Server storage [IO: ▲2.39MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 295 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
wp_mybackup_options
db_upgraded

Browser metrics Passed 4 tests

WP MyBackup: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲11914.57 ▲0.331.86 ▲0.1929.15 ▼16.76
Dashboard /wp-admin2,273 ▲985.57 ▼0.1597.08 ▼15.8991.64 ▲45.85
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0738.91 ▲3.3933.32 ▼3.20
Add New Post /wp-admin/post-new.php1,529 ▲323.41 ▲0.65668.92 ▼6.1053.95 ▼4.76
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0395.24 ▼3.7341.02 ▲0.68
WP MyBackup /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a482,64413.00285.8987.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • wp_mybackup_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/wp-mybackup/class/functions/utils/wp-wrappers.php+55
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > Deprecated in wp-content/plugins/wp-mybackup/class/Dashboard.php+59
    Function get_magic_quotes_gpc() is deprecated
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > Notice in wp-content/plugins/wp-mybackup/class/lib/editor/AbstractTargetEditor.php+116
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > Deprecated in wp-content/plugins/wp-mybackup/class/lib/curl/CurlFtpWrapper.php+137
    Array and string offset access syntax with curly braces is deprecated
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > Warning in wp-content/plugins/wp-mybackup/class/functions/utils/ui.php+84
    constant(): Couldn't find constant MyBackup\APP_RESTORE
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > Warning in wp-content/plugins/wp-mybackup/class/functions/utils/ui.php+84
    constant(): Couldn't find constant MyBackup\APP_LISTVIEW_TARGETS
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > Warning in wp-content/plugins/wp-mybackup/class/functions/utils/ui.php+84
    constant(): Couldn't find constant MyBackup\APP_LICENSE
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=e7606c0f01e39eeeebf16123bfdb5a48
    • > Warning in wp-content/plugins/wp-mybackup/class/functions/utils/ui.php+84
    constant(): Couldn't find constant MyBackup\APP_ADDONDROPIN

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-mybackup/class/lib/editor/templates/_not_found_template_.php
    • > /wp-content/plugins/wp-mybackup/WPMyBackup.php
  • 351× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'FUNCTIONS_PATHutils.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mybackup/class/MySQLBackupHandler.php on line 38
    • > PHP Warning
      Use of undefined constant FUNCTIONS_PATH - assumed 'FUNCTIONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-mybackup/class/AjaxRequests.php on line 38
    • > PHP Warning
      Use of undefined constant CURL_PATH - assumed 'CURL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-mybackup/class/autoloader.php on line 68
    • > PHP Warning
      Use of undefined constant STORAGE_PATH - assumed 'STORAGE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-mybackup/class/autoloader.php on line 54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MyBackup\\register_settings() in wp-content/plugins/wp-mybackup/config/addons/10-cpu_sleep.php:48
    • > PHP Fatal error
      require_once(): Failed opening required 'LIB_PATHMyException.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mybackup/class/LocalFilesMD5.php on line 38
    • > PHP Warning
      Use of undefined constant UTILS_PATH - assumed 'UTILS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-mybackup/class/functions/utils.php on line 68
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-mybackup/class/functions/addonfunc/restore_mysql.php:189
    • > PHP Fatal error
      require_once(): Failed opening required 'LIB_PATHMyException.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mybackup/class/TarArchive.php on line 46
    • > PHP Fatal error
      require_once(): Failed opening required 'CLASS_PATHconstants.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mybackup/config/config-custom.php on line 43

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)
No browser issues were found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-mybackup === )
  • Screenshots: These screenshots lack descriptions #16, #17, #18, #19 in wp-mybackup/assets to your readme.txt
  • Tags: There were no tags found
The official readme.txt might help

wp-mybackup/WPMyBackup.php 69% from 13 tests

Analyzing the main PHP file in "WP MyBackup" version 1.0-3 $...
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-mybackup.php" instead of "WPMyBackup.php")
  • Description: Please use more than 10 characters for the plugin description (currently 0 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1.0-3 $...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin28,852 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
PHP1853006,11628,752
HTML15089
JavaScript5005
CSS3003
INI1202
JSON1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity39.67
▷ Minimum class complexity1.00
▷ Maximum class complexity321.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes83
▷ Abstract classes67.23%
▷ Concrete classes7792.77%
▷ Final classes00.00%
Methods939
▷ Static methods151.60%
▷ Public methods51254.53%
▷ Protected methods20121.41%
▷ Private methods22624.07%
Functions522
▷ Named functions35968.77%
▷ Anonymous functions16331.23%
Constants482
▷ Global constants47197.72%
▷ Class constants112.28%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
73 PNG files occupy 0.60MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/help.png0.15KB0.17KB0.00%
assets/screenshot-9.png32.83KB32.15KB▼ 2.07%
img/ssl-icon.png1.29KB1.31KB0.00%
img/key.png0.66KB0.42KB▼ 36.70%
img/twitter.png1.79KB0.69KB▼ 61.63%