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

Code Review | 1-Click Backup & Restore Database

WordPress plugin 1-Click Backup & Restore Database scored 83% 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: 6.3.1
  • 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

10+ active / 2,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.10ms] Passed 4 tests

A check of server-side resources used by 1-Click Backup & Restore Database
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.68 ▲3.31
Dashboard /wp-admin3.33 ▲0.0245.57 ▼4.39
Posts /wp-admin/edit.php3.38 ▲0.0246.64 ▼0.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.11 ▼0.65
Media Library /wp-admin/upload.php3.25 ▲0.0235.25 ▲1.00

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for 1-Click Backup & Restore Database
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.66 ▼0.701.55 ▼0.3639.24 ▼3.27
Dashboard /wp-admin2,224 ▲354.88 ▼0.03105.88 ▼18.4839.24 ▼5.51
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0238.99 ▲4.8835.74 ▼0.34
Add New Post /wp-admin/post-new.php1,552 ▲3818.48 ▲1.02610.74 ▼85.8250.47 ▼7.55
Media Library /wp-admin/upload.php1,409 ▲274.27 ▲0.1192.26 ▼14.7440.18 ▼7.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (screenshot-1.png 1-click Backup & Restore Database main form) image missing
Please take inspiration from this readme.txt

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

The entry point to "1-Click Backup & Restore Database" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • 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
  • Main file name: Name the main plugin file the same as the plugin slug ("1-click-backup-restore-database-by-sunbytes.php" instead of "sbocbr.php")

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
Success! There were 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

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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%