48% fny-database-backup

Code Review | Backup Database

WordPress plugin Backup Database scored48%from 54 tests.

About plugin

  • Plugin page: fny-database-backup
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Apr 13, 2017
  • Latest release: Jul 28, 2018
  • Number of updates: 59
  • Update frequency: every 8.0 days
  • Top authors: fnywebit (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

90+ active /2,888 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by Backup Database
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.40 ▼6.91
Dashboard /wp-admin3.33 ▲0.0349.58 ▼0.93
Posts /wp-admin/edit.php3.38 ▲0.0349.30 ▲1.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.35 ▼7.32
Media Library /wp-admin/upload.php3.25 ▲0.0339.07 ▲2.56

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 713 new files
Database: 2 new tables, 6 new options
New tables
wp_fny_configs
wp_fny_backups
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Backup Database
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.24 ▼0.481.87 ▲0.0844.58 ▼3.61
Dashboard /wp-admin2,208 ▲285.48 ▼0.1790.90 ▼8.8740.33 ▼2.83
Posts /wp-admin/edit.php2,113 ▲132.01 ▲0.0633.72 ▼6.8535.55 ▼0.71
Add New Post /wp-admin/post-new.php1,539 ▲1323.55 ▼0.05620.17 ▼33.9547.82 ▼12.88
Media Library /wp-admin/upload.php1,416 ▲134.28 ▲0.0498.14 ▼7.0443.69 ▼3.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/fny-database-backup/com/core/FNYBackupCore.php+85
    Undefined variable: fnytablestruct
  • The plugin did not uninstall correctly, leaving 713 files (6.82MB) in the plugin directory
    • (new file) com/core/FNYBackupConfig.php
    • (new file) README.txt
    • (new file) com/config/config.pro.php
    • (new file) com/core/FNYBackupLog.php
    • (new file) com/core/FNYBackupCore.php
    • (new file) com/config/config.php
    • (new file) com/config/config.free.php
    • (new file) com/boot.php
    • (new file) com/core/FNYBackupDump.php
    • (new file) com/core/FNYBackupHelper.php
    • ...
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_fny_backups
    • wp_fny_configs
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 12× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/examples/resumeChunkedUpload.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/examples/chunkedUpload.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/examples/getFile.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/examples/metaData.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/tests/setup.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/examples/shares.php
    • > /wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/examples/accountInfo.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/examples/bootstrap.php
    • > /wp-content/plugins/fny-database-backup/com/includes/Dropbox/tests/bootstrap.php
  • 4095× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 5
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/fny-database-backup/public/email/templates/mail_backup.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

fny-database-backup/fny-database-backup.php Passed 13 tests

Analyzing the main PHP file in "Backup Database" version 1.6.1
68 characters long description:
FNY Backup Database is the best choice for WordPress based WebSites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin105,815 lines of code in 696 files:
LanguageFilesBlank linesComment linesLines of code
PHP6579,37832,36795,393
CSS518307,377
JavaScript46622222,008
JSON2300637
SVG100288
Markdown5360103
SQL1009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.95
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity1.26
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces83
Interfaces74
Traits2
Classes2,024
▷ Abstract classes432.12%
▷ Concrete classes1,98197.88%
▷ Final classes10.05%
Methods15,070
▷ Static methods2391.59%
▷ Public methods14,62097.01%
▷ Protected methods2851.89%
▷ Private methods1651.09%
Functions90
▷ Named functions1820.00%
▷ Anonymous functions7280.00%
Constants335
▷ Global constants3911.64%
▷ Class constants29688.36%
▷ Public constants296100.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
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/gallery.png19.85KB8.35KB▼ 57.96%
public/img/share.png65.63KB23.11KB▼ 64.79%