84% electric-backups

Code Review | Electric Backups

WordPress plugin Electric Backups scored84%from 54 tests.

About plugin

  • Plugin page: electric-backups
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: May 13, 2019
  • Latest release: Aug 15, 2022
  • Number of updates: 10
  • Update frequency: every 119.1 days
  • Top authors: electriccode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,591 total downloads

Benchmarks

Plugin footprint 82% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.93ms] Passed 4 tests

An overview of server-side resources used by Electric Backups
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.73 ▼0.91
Dashboard /wp-admin3.34 ▲0.0451.70 ▼2.66
Posts /wp-admin/edit.php3.39 ▲0.0348.56 ▼2.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.90 ▼21.65
Media Library /wp-admin/upload.php3.26 ▲0.0335.99 ▲0.98
Electric Backups /wp-admin/tools.php?page=electric-backups3.2434.00

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

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • You have illegally modified 2 files (255.75KB) outside of "wp-content/plugins/electric-backups/" and "wp-content/uploads/"
    • (new file) wp-content/backups/2023-10-18-23-28-28.zip
    • (new file) wp-content/backups/.htaccess
Filesystem: 2 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
electric_backups_history
db_upgraded
widget_recent-posts
electric_backups_last_run
widget_recent-comments
can_compress_scripts
electric_backups_time

Browser metrics Passed 4 tests

This is an overview of browser requirements for Electric Backups
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.72 ▲0.371.96 ▲0.2546.98 ▲3.49
Dashboard /wp-admin2,199 ▲255.61 ▲0.0688.75 ▼1.4341.25 ▼2.65
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0436.74 ▲0.9935.16 ▼2.54
Add New Post /wp-admin/post-new.php1,530 ▲423.04 ▼0.41661.85 ▼30.9455.07 ▲4.32
Media Library /wp-admin/upload.php1,404 ▲44.12 ▼0.0199.82 ▼2.9446.19 ▲2.09
Electric Backups /wp-admin/tools.php?page=electric-backups8511.9922.0332.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • electric_backups_last_run
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • electric_backups_history
    • theysaidso_admin_options
    • electric_backups_time

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/electric-backups/electric-backups.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: backups, database

electric-backups/electric-backups.php Passed 13 tests

The principal PHP file in "Electric Backups" v. 1.0.2 is loaded by WordPress automatically on each request
55 characters long description:
Automatically create backups of your WordPress database

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
Good job! No executable or dangerous file extensions detected202 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16259202

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected