10% wp-auto-backup

Code Review | WordPress Auto Backup

WordPress plugin WordPress Auto Backup scored 10% from 53 tests.

About plugin

  • Plugin page: wp-auto-backup
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.3
  • WordPress version: 5.8.1
  • First release: Aug 14, 2015
  • Latest release: Sep 2, 2015
  • Number of updates: 9
  • Update frequency: every 2.4 days
  • Top authors: AhmedGsm (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 1,774 total downloads

Benchmarks

Plugin footprint 58% 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
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-auto-backup/Data.php+47
    Undefined variable: Base_name

Server metrics [RAM: ▲0.12MB] [CPU: ▼257.28ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Auto Backup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2239.74 ▲14.50
Dashboard /wp-admin3.16 ▲0.1147.25 ▲7.24
Posts /wp-admin/edit.php3.28 ▲0.1746.51 ▲7.76
Add New Post /wp-admin/post-new.php5.54 ▲0.1196.33 ▼1,047.38
Media Library /wp-admin/upload.php3.11 ▲0.1042.39 ▲3.26

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: 1 new table, no new options
New tables
wp_database_autobackup

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Auto Backup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲6915.78 ▲0.247.29 ▼4.2648.10 ▼3.34
Dashboard /wp-admin2,941 ▲885.91 ▼0.14133.32 ▼3.86123.32 ▲19.47
Posts /wp-admin/edit.php2,742 ▲392.69 ▼0.0064.32 ▲4.1092.52 ▼0.82
Add New Post /wp-admin/post-new.php1,496 ▼35718.59 ▼0.52383.15 ▲9.15106.14 ▼1.97
Media Library /wp-admin/upload.php1,731 ▼444.98 ▼0.02127.96 ▼22.25140.58 ▲28.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivate_uninstall' not found or invalid function name

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
Good news, no errors were detected

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
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-auto-backup/Database_Backup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-auto-backup/Main.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-auto-backup/Data.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-auto-backup/File.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'dj_store' not found in wp-content/plugins/wp-auto-backup/Admin_Form.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Plugin Name: Please specify the plugin name on the first line ( === wp-auto-backup === )
You can look at the official readme.txt

wp-auto-backup/Main.php 85% from 13 tests

"WordPress Auto Backup" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 508 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-auto-backup.php" instead of "Main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin6,044 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
SQL18,23304,978
PHP730151,011
CSS11055

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity14.25
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.20MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/Database.png0.78KB0.96KB0.00%
Inline_Preview_Image.png196.11KB77.01KB▼ 60.73%
thumbnail.png8.53KB4.22KB▼ 50.57%