93% pcloud-backup

Code Review | pCloud Backup

WordPress plugin pCloud Backup scored 93% from 54 tests.

About plugin

  • Plugin page: pcloud-backup
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 5.8.1
  • First release: Feb 14, 2019
  • Latest release: Aug 21, 2020
  • Number of updates: 15
  • Update frequency: every 37.1 days
  • Top authors: josselynj (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 1,870 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼147.60ms] Passed 4 tests

Analyzing server-side resources used by pCloud Backup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0837.76 ▼0.92
Dashboard /wp-admin3.14 ▲0.0948.52 ▼3.92
Posts /wp-admin/edit.php3.19 ▲0.0949.48 ▲2.14
Add New Post /wp-admin/post-new.php5.51 ▲0.07100.94 ▼579.12
Media Library /wp-admin/upload.php3.09 ▲0.0837.32 ▼6.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 66 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

pCloud Backup: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,706 ▲13416.15 ▲0.639.64 ▲0.8751.38 ▲3.10
Dashboard /wp-admin3,019 ▲896.02 ▼0.14147.74 ▼11.64113.58 ▼1.10
Posts /wp-admin/edit.php2,766 ▲272.74 ▲0.0473.46 ▼0.1199.22 ▲7.98
Add New Post /wp-admin/post-new.php1,635 ▲2021.34 ▼0.20290.30 ▼41.14109.09 ▼4.32
Media Library /wp-admin/upload.php1,834 ▲275.07 ▼0.06168.75 ▲1.54138.36 ▲14.75

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'pCloud\\Curl' not found in wp-content/plugins/pcloud-backup/lib/pCloud/TestCurl.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'pCloud\\Curl' not found in wp-content/plugins/pcloud-backup/pcloud-backup/trunk/lib/pCloud/TestCurl.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

pcloud-backup/pcloud-backup.php 85% from 13 tests

The primary PHP file in "pCloud Backup" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 219 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,227 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS42,147581,832
PHP209421141,130
JavaScript11883167
PO File1363698

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods110
▷ Static methods109.09%
▷ Public methods9081.82%
▷ Protected methods00.00%
▷ Private methods2018.18%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.69MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pcloud-backup/assets/banner-1554x500.png235.67KB127.03KB▼ 46.10%
pcloud-backup/assets/screenshot-1.png160.05KB72.77KB▼ 54.53%
pcloud-backup/assets/screenshot-2.png161.92KB66.60KB▼ 58.87%
pcloud-backup/assets/icon-128x128.png16.22KB6.27KB▼ 61.36%
pcloud-backup/assets/banner-772x250.png87.27KB35.13KB▼ 59.75%