73% gw-database-backup

Code Review | GW Database Backup

WordPress plugin GW Database Backup scored73%from 54 tests.

About plugin

  • Plugin page: gw-database-backup
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.4
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: May 5, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: monim13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /426 total downloads

Benchmarks

Plugin footprint 65% 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.02MB] [CPU: ▼4.70ms] Passed 4 tests

This is a short check of server-side resources used by GW Database Backup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.32 ▲1.95
Dashboard /wp-admin3.33 ▲0.0346.24 ▼3.22
Posts /wp-admin/edit.php3.38 ▲0.0248.03 ▲1.23
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.17 ▼18.75
Media Library /wp-admin/upload.php3.25 ▲0.0238.22 ▲7.64
GW DB Backup /wp-admin/options-general.php?page=gw-database-backup3.2231.64

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GW Database Backup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.23 ▼0.391.65 ▼0.2539.63 ▼0.02
Dashboard /wp-admin2,205 ▲285.66 ▼0.0587.48 ▼0.2339.09 ▼2.88
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0239.35 ▲0.4136.25 ▼12.54
Add New Post /wp-admin/post-new.php1,688 ▲16222.31 ▼0.85623.01 ▼67.8750.80 ▲1.32
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.0596.38 ▼4.7446.21 ▲3.73
GW DB Backup /wp-admin/options-general.php?page=gw-database-backup8831.6826.7131.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'GWBackup' not found
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/gw-database-backup/gw-database-backup.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed: The official readme.txt is a good inspiration

gw-database-backup/gw-database-backup.php 77% from 13 tests

The main PHP script in "GW Database Backup" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "5.0.0")
  • Domain Path: The domain path folder was not found ("/languages")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected686 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP57281592
JavaScript14460
CSS271234

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity27.67
▷ Minimum class complexity20.00
▷ Maximum class complexity33.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods1133.33%
▷ Public methods2369.70%
▷ Protected methods00.00%
▷ Private methods1030.30%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants8
▷ Global constants8100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png1.04KB1.06KB0.00%