93% 1-click-backup-restore-database-by-sunbytes

Code Review | 1-Click Backup & Restore Database

WordPress plugin 1-Click Backup & Restore Database scored 93% from 54 tests.

About plugin

  • Plugin page: 1-click-backup-re...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 5.9.2
  • First release: Apr 6, 2016
  • Latest release: Jun 21, 2016
  • Number of updates: 15
  • Update frequency: every 5.1 days
  • Top authors: nmt90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,963 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼290.08ms] Passed 4 tests

Analyzing server-side resources used by 1-Click Backup & Restore Database
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.4294.48 ▲67.53
Dashboard /wp-admin3.44 ▲0.0335.57 ▲1.36
Posts /wp-admin/edit.php3.66 ▲0.0239.73 ▲3.16
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.90 ▼1,165.72
Media Library /wp-admin/upload.php3.31 ▲0.0226.94 ▲0.90

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for 1-Click Backup & Restore Database
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲3116.17 ▲0.166.02 ▲0.132.92 ▼0.13
Dashboard /wp-admin2,914 ▲536.11 ▼0.05121.04 ▼13.22165.41 ▲2.11
Posts /wp-admin/edit.php2,710 ▲193.23 ▲0.2167.52 ▲2.95153.83 ▲11.62
Add New Post /wp-admin/post-new.php1,705 ▼621.41 ▲0.70428.94 ▼11.74161.83 ▲5.81
Media Library /wp-admin/upload.php1,717 ▲195.50 ▲0.05137.03 ▼7.90182.55 ▼3.87

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sbocbr_get_setting() in wp-content/plugins/1-click-backup-restore-database-by-sunbytes/views/main.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Screenshots: Screenshot #1 (screenshot-1.png 1-click Backup & Restore Database main form) image required
The official readme.txt is a good inspiration

1-click-backup-restore-database-by-sunbytes/sbocbr.php 85% from 13 tests

Analyzing the main PHP file in "1-Click Backup & Restore Database" version 1.0.3
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("1-click-backup-restore-database-by-sunbytes.php" instead of "sbocbr.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin736 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3179106702
CSS16034

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.06KB19.61KB▼ 65.63%