84% cc-backup

Code Review | CC-Backup

WordPress plugin CC-Backup scored84%from 54 tests.

About plugin

  • Plugin page: cc-backup
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Aug 23, 2017
  • Latest release: Mar 13, 2018
  • Number of updates: 3
  • Update frequency: every 67.7 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /981 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼5.57ms] Passed 4 tests

An overview of server-side resources used by CC-Backup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2346.17 ▲6.16
Dashboard /wp-admin3.55 ▲0.2048.41 ▼16.08
Posts /wp-admin/edit.php3.60 ▲0.2450.84 ▲2.82
Add New Post /wp-admin/post-new.php6.07 ▲0.1890.44 ▼11.28
Media Library /wp-admin/upload.php3.41 ▲0.1839.45 ▲2.28
Backup /wp-admin/options-general.php?page=cc-backup3.4036.81

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for CC-Backup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.73 ▲0.422.01 ▼0.0143.87 ▼0.36
Dashboard /wp-admin2,206 ▲265.57 ▼0.1185.59 ▼5.9040.34 ▲0.77
Posts /wp-admin/edit.php2,114 ▲141.99 ▼0.0141.96 ▲5.5741.52 ▲6.63
Add New Post /wp-admin/post-new.php1,435 ▼9622.23 ▲1.16572.02 ▼125.2342.36 ▼14.22
Media Library /wp-admin/upload.php1,411 ▲114.17 ▼0.0895.12 ▼10.1140.25 ▼5.93
Backup /wp-admin/options-general.php?page=cc-backup9332.0628.2329.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

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 trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Exception: Connection to mysql failed with message: SQLSTATE[HY000] [1045] Access denied for user 'travis'@'localhost' (using password: NO) in wp-content/plugins/cc-backup/vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php:297

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (**WordPress General Settings** - Visit 'Settings > Backup', backup & restore dumps.) image required
The official readme.txt might help

cc-backup/plugin.php 92% from 13 tests

The entry point to "CC-Backup" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cc-backup.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin3,437 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP255367902,478
SQL87994341
Markdown1560232
Bourne Shell3304155
JSON20082
PO File1436667
YAML212864
XML10018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.62
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes24
▷ Abstract classes520.83%
▷ Concrete classes1979.17%
▷ Final classes00.00%
Methods218
▷ Static methods2210.09%
▷ Public methods17680.73%
▷ Protected methods188.26%
▷ Private methods2411.01%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png45.35KB14.81KB▼ 67.34%