67% backupsavvychild

Code Review | BackupSavvy Child wordpress plugin

WordPress plugin BackupSavvy Child wordpress plugin scored67%from 54 tests.

About plugin

  • Plugin page: backupsavvychild
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2018
  • Latest release: Feb 6, 2020
  • Number of updates: 7
  • Update frequency: every 77.2 days
  • Top authors: pdtasktrack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /980 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.59MB] [CPU: ▼12.44ms] Passed 4 tests

A check of server-side resources used by BackupSavvy Child wordpress plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1141.19 ▲1.65
Dashboard /wp-admin3.40 ▲0.1047.85 ▼1.25
Posts /wp-admin/edit.php3.45 ▲0.1047.66 ▼0.16
Add New Post /wp-admin/post-new.php3.22 ▼2.6737.51 ▼50.00
Media Library /wp-admin/upload.php3.32 ▲0.1037.73 ▲2.30

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

Input-output and database impact of this plugin
Please fix the following
  • There were 2 files (0.00KB) illegally modified outside of "wp-content/plugins/backupsavvychild/" and "wp-content/uploads/"
    • (new file) backupsavvy_sql/.empty
    • (new file) backupsavvy_dump/.empty
Filesystem: 705 new files
Database: no new tables, 7 new options
New WordPress options
backupsavvy_child_secret
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for BackupSavvy Child wordpress plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5413.20 ▼1.191.75 ▼0.2644.89 ▼1.02
Dashboard /wp-admin2,214 ▲385.85 ▼0.0399.33 ▼16.5941.19 ▼5.38
Posts /wp-admin/edit.php2,097 ▲82.06 ▲0.0635.61 ▼0.1233.61 ▼0.09
Add New Post /wp-admin/post-new.php1,543 ▲1023.17 ▼0.15655.90 ▼33.0252.78 ▼1.75
Media Library /wp-admin/upload.php1,399 ▲174.24 ▲0.0393.22 ▼10.4940.31 ▼5.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/backupsavvychild/backupsavvychild.php+465
    rmdir(backupsavvy_dump): Directory not empty
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/backupsavvychild/vendor/altayalp/ftp-client/tests/bootstrap.php
  • 375× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'altayalp\\FtpClient\\Interfaces\\ServerInterface' not found in wp-content/plugins/backupsavvychild/vendor/altayalp/ftp-client/src/Servers/FtpServer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/backupsavvychild/vendor/google/apiclient-services/src/Google/Service/Drive/PermissionPermissionDetails.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/backupsavvychild/vendor/guzzlehttp/promises/src/AggregateException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' not found in wp-content/plugins/backupsavvychild/vendor/symfony/var-dumper/Dumper/CliDumper.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/backupsavvychild/vendor/altayalp/ftp-client/tests/Sftp/ServerExceptionTest.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Handler\\HandlerInterface' not found in wp-content/plugins/backupsavvychild/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Rijndael' not found in wp-content/plugins/backupsavvychild/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php:59
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/backupsavvychild/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'altayalp\\FtpClient\\Tests\\AbstractTest' not found in wp-content/plugins/backupsavvychild/vendor/altayalp/ftp-client/tests/Ftp/DirectoryTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/backupsavvychild/vendor/kunalvarma05/dropbox-php-sdk/tests/DropboxTest.php:4

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: savvy backup, multi backtup child, backup

backupsavvychild/backupsavvychild.php 85% from 13 tests

This is the main PHP file of "BackupSavvy Child wordpress plugin" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/")
  • Domain Path: Prefix the domain path with a forward slash character ("//")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin70,286 lines of code in 669 files:
LanguageFilesBlank linesComment linesLines of code
PHP58911,87935,95562,818
Markdown481,89105,332
JSON20001,842
CSS100130
YAML515078
XML33057
Dockerfile18010
JavaScript10010
make1409

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.16
▷ Minimum class complexity1.00
▷ Maximum class complexity631.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces68
Interfaces50
Traits13
Classes507
▷ Abstract classes183.55%
▷ Concrete classes48996.45%
▷ Final classes204.09%
Methods4,328
▷ Static methods3989.20%
▷ Public methods3,73186.21%
▷ Protected methods2545.87%
▷ Private methods3437.93%
Functions275
▷ Named functions11541.82%
▷ Anonymous functions16058.18%
Constants422
▷ Global constants286.64%
▷ Class constants39493.36%
▷ Public constants37494.92%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin