84% wp2pcloud

Code Review | Backup to pCloud

WordPress plugin Backup to pCloud scored84%from 54 tests.

About plugin

  • Plugin page: wp2pcloud
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 13, 2013
  • Latest release: Dec 22, 2016
  • Number of updates: 26
  • Update frequency: every 43.2 days
  • Top authors: tunio (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

20+ active /2,427 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.91ms] Passed 4 tests

Server-side resources used by Backup to pCloud
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1444.14 ▼0.51
Dashboard /wp-admin3.32 ▲0.0246.56 ▼6.59
Posts /wp-admin/edit.php3.37 ▲0.0255.70 ▲6.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.38 ▼16.27
Media Library /wp-admin/upload.php3.25 ▲0.0234.88 ▼0.25

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: 2 new tables, 6 new options
New tables
wp_wp2pcloud_config
wp_wp2pcloud_logs
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Backup to pCloud
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲17313.97 ▼0.618.51 ▲6.6346.65 ▲1.34
Dashboard /wp-admin2,233 ▲335.86 ▼0.0399.00 ▼7.5280.33 ▲35.66
Posts /wp-admin/edit.php2,112 ▲152.03 ▲0.0435.69 ▼4.7633.57 ▼5.86
Add New Post /wp-admin/post-new.php1,540 ▲722.99 ▼0.13750.80 ▲140.3062.35 ▲12.07
Media Library /wp-admin/upload.php1,412 ▲154.20 ▼0.05100.45 ▼4.3862.57 ▲16.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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
Even though everything seems fine, this is not 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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp2pcloud_getAuth() in wp-content/plugins/wp2pcloud/views/wp2pcloud-config.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp2pcloud/wordpress-backup-to-pcloud.php:18

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 Passed 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
2 plugin tags: backup, pcloud

wp2pcloud/wordpress-backup-to-pcloud.php 85% from 13 tests

This is the main PHP file of "Backup to pCloud" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp2pcloud.php" instead of "wordpress-backup-to-pcloud.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected3,054 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP146601,4342,851
JavaScript1240128
CSS112075

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.58
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes417.39%
▷ Concrete classes1982.61%
▷ Final classes00.00%
Methods261
▷ Static methods103.83%
▷ Public methods21983.91%
▷ Protected methods93.45%
▷ Private methods3312.64%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants330.00%
▷ Class constants770.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/login_bcgr.png48.41KB24.15KB▼ 50.11%
images/register_btn.png10.08KB4.63KB▼ 54.07%
images/logo-n1.png1.72KB1.61KB▼ 6.85%
images/logo_16.png1.79KB1.03KB▼ 42.45%
images/zip.png1.17KB1.32KB0.00%