10% backup-scheduler

Code Review | Backup Scheduler

WordPress plugin Backup Scheduler scored 10% from 54 tests.

About plugin

  • Plugin page: backup-scheduler
  • Plugin version: 1.5.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 5.8.1
  • First release: Dec 6, 2011
  • Latest release: Aug 22, 2017
  • Number of updates: 113
  • Update frequency: every 18.7 days
  • Top authors: sedLex (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active / 112,552 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/backup-scheduler/core/utils.class.php+305
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▲0.14MB] [CPU: ▼146.77ms] Passed 4 tests

This is a short check of server-side resources used by Backup Scheduler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2630.79 ▲5.99
Dashboard /wp-admin3.20 ▲0.1431.90 ▼6.94
Posts /wp-admin/edit.php3.25 ▲0.1431.52 ▼8.04
Add New Post /wp-admin/post-new.php5.57 ▲0.1368.32 ▼575.89
Media Library /wp-admin/upload.php3.15 ▲0.1425.40 ▲3.80

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

Input-output and database impact of this plugin
These are issues you should consider
  • You have illegally modified 4 files (0.03KB) outside of "wp-content/plugins/backup-scheduler/" and "wp-content/uploads/"
    • (new file) wp-content/sedlex/backup-scheduler/index.php
    • (new file) wp-content/sedlex/inline_styles/.empty
    • (new file) wp-content/sedlex/inline_scripts/.empty
    • (new file) wp-content/sedlex/backup-scheduler/last_backup
Filesystem: 211 new files
Database: no new tables, 3 new options
New WordPress options
backup_scheduler_options
plugin_error_on_activation
coreSLframework_options

Browser metrics Passed 4 tests

Checking browser requirements for Backup Scheduler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲9815.58 ▼0.115.69 ▲0.3777.83 ▲3.30
Dashboard /wp-admin2,964 ▲716.12 ▼0.03114.73 ▼17.99166.98 ▼5.72
Posts /wp-admin/edit.php2,775 ▲383.37 ▲0.0264.57 ▼0.20140.79 ▲8.40
Add New Post /wp-admin/post-new.php3,940 ▲19719.55 ▲0.85461.21 ▲46.39169.18 ▼6.73
Media Library /wp-admin/upload.php1,784 ▲355.50 ▼0.07159.75 ▲21.95197.40 ▲14.39
Backup Scheduler /wp-admin/sedlex.php?page=backup-scheduler/backup-scheduler.php260.940.0322.07
About... /wp-admin/sedlex.php260.940.0315.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method backup_scheduler::uninstall_removedata() should not be called statically
  • This plugin does not fully uninstall, leaving 2 options in the database
    • coreSLframework_options
    • plugin_error_on_activation

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/backup-scheduler/backup-scheduler.php
    • > /wp-content/plugins/backup-scheduler/core.class.php
    • > /wp-content/plugins/backup-scheduler/core.php
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(Math/BigInteger.php): failed to open stream: No such file or directory in wp-content/plugins/backup-scheduler/include/phpseclib0.3.1/File/ASN1.php on line 48
    • > PHP Fatal error
      require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php') in wp-content/plugins/backup-scheduler/include/phpseclib0.3.1/Net/SSH2.php on line 77
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-pclzip.php' (include_path='.:/usr/share/php') in wp-content/plugins/backup-scheduler/include/zip.class.php on line 7
    • > PHP Warning
      require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/backup-scheduler/core/templates/my-plugin.php on line 18
    • > PHP Warning
      require_once(Net/SSH2.php): failed to open stream: No such file or directory in wp-content/plugins/backup-scheduler/include/phpseclib0.3.1/Net/SFTP.php on line 61
    • > PHP Fatal error
      require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/backup-scheduler/core/templates/my-plugin.php on line 18
    • > PHP Warning
      require_once(File/ASN1.php): failed to open stream: No such file or directory in wp-content/plugins/backup-scheduler/include/phpseclib0.3.1/File/X509.php on line 51
    • > PHP Fatal error
      require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php') in wp-content/plugins/backup-scheduler/include/phpseclib0.3.1/File/ASN1.php on line 48
    • > PHP Warning
      require_once(Math/BigInteger.php): failed to open stream: No such file or directory in wp-content/plugins/backup-scheduler/include/phpseclib0.3.1/Crypt/RSA.php on line 76
    • > PHP Fatal error
      require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php') in wp-content/plugins/backup-scheduler/include/phpseclib0.3.1/Crypt/RSA.php on line 76

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/sedlex.php?page=backup-scheduler/backup-scheduler.php
    • > Network (severe)
    wp-admin/sedlex.php?page=backup-scheduler/backup-scheduler.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/sedlex.php
    • > Network (severe)
    wp-admin/sedlex.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (A list of all backup files), #2 (The configuration page of the plugin)
Please take inspiration from this readme.txt

backup-scheduler/backup-scheduler.php 92% from 13 tests

The main PHP file in "Backup Scheduler" ver. 1.5.13 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 444 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected35,792 lines of code in 103 files:
LanguageFilesBlank linesComment linesLines of code
PHP363,70110,58121,706
PO File475,816012,635
JavaScript6225260877
CSS108513459
Markdown120084
JSON10029
INI2002

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity104.58
▷ Minimum class complexity1.00
▷ Maximum class complexity433.00
Average method complexity7.53
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes12.78%
▷ Concrete classes3597.22%
▷ Final classes00.00%
Methods571
▷ Static methods407.01%
▷ Public methods56899.47%
▷ Protected methods30.53%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants162
▷ Global constants162100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
35 PNG files occupy 0.67MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/banner-1544x500.png254.03KB98.51KB▼ 61.22%
screenshot-1.png123.52KB36.07KB▼ 70.80%
core/img/tab_empty.png0.08KB0.09KB0.00%
core/img/progressbar.png1.43KB1.25KB▼ 12.96%
core/img/warning.png4.46KB1.51KB▼ 66.10%