72% cloud

Code Review | WP Cloud

WordPress plugin WP Cloud scored 72% from 54 tests.

About plugin

  • Plugin page: cloud
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.5
  • WordPress version: 5.8.1
  • First release: Jul 16, 2014
  • Latest release: Oct 1, 2020
  • Number of updates: 31
  • Update frequency: every 73.2 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 8,606 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼140.47ms] Passed 4 tests

This is a short check of server-side resources used by WP Cloud
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.1226.46 ▼8.21
Dashboard /wp-admin3.19 ▲0.1342.69 ▼4.02
Posts /wp-admin/edit.php3.30 ▲0.1950.48 ▲5.00
Add New Post /wp-admin/post-new.php5.54 ▲0.1188.72 ▼554.29
Media Library /wp-admin/upload.php3.13 ▲0.1337.11 ▲4.66
Log /wp-admin/admin.php?page=wpcloud_log3.1028.36
Cloud /wp-admin/admin.php?page=wpcloud3.1228.66
Settings /wp-admin/admin.php?page=wpcloud_settings3.1135.82
Public Cloud Iframe /wp-admin/admin.php?page=wpclod_iframe3.1235.24
System /wp-admin/admin.php?page=wpcloud_sys3.0733.22

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

A short overview of filesystem and database impact
Please fix the following
  • The plugin illegally modified 1 file (0.66KB) outside of "wp-content/plugins/cloud/" and "wp-content/uploads/"
    • (new file) cloud/index.php
Filesystem: 31 new files
Database: no new tables, 3 new options
New WordPress options
wpcloud_default_overlap
wpcloud_version
wpcloud_default_quota

Browser metrics Passed 4 tests

A check of browser resources used by WP Cloud
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,742 ▲14615.95 ▲0.3314.02 ▲3.7446.08 ▼1.92
Dashboard /wp-admin3,012 ▲785.90 ▼0.09133.09 ▼16.26113.86 ▲2.51
Posts /wp-admin/edit.php2,778 ▲392.72 ▲0.0071.97 ▲2.4888.52 ▼0.18
Add New Post /wp-admin/post-new.php1,523 ▼16018.91 ▲0.31395.67 ▼44.63105.35 ▼0.14
Media Library /wp-admin/upload.php1,849 ▲395.05 ▲0.03155.42 ▼2.22117.99 ▼0.08
Log /wp-admin/admin.php?page=wpcloud_log1,0132.0949.5566.60
Cloud /wp-admin/admin.php?page=wpcloud1,3205.3878.84132.22
Settings /wp-admin/admin.php?page=wpcloud_settings1,4656.68215.60101.60
Public Cloud Iframe /wp-admin/admin.php?page=wpclod_iframe1,0322.3364.0185.51
System /wp-admin/admin.php?page=wpcloud_sys1,1072.0658.0467.56

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 3 options in the database
    • wpcloud_default_quota
    • wpcloud_version
    • wpcloud_default_overlap

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpclod_iframe
    • > Warning in wp-content/plugins/cloud/shortcodes/user_files_table.php+2
    Illegal string offset 'id'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpclod_iframe
    • > Notice in wp-content/plugins/cloud/shortcodes/user_files_table.php+2
    Uninitialized string offset: 0
    • > GET request to /wp-admin/admin.php?page=wpcloud
    • > Warning in wp-content/plugins/cloud/panel.php+34
    Division by zero
    • > GET request to /wp-admin/admin.php?page=wpcloud_sys
    • > Notice in wp-content/plugins/cloud/sys_panel.php+11
    Undefined variable: max_upload
    • > GET request to /wp-admin/admin.php?page=wpcloud_sys
    • > Notice in wp-content/plugins/cloud/sys_panel.php+11
    Undefined variable: max_post
    • > GET request to /wp-admin/admin.php?page=wpcloud_sys
    • > Notice in wp-content/plugins/cloud/sys_panel.php+11
    Undefined variable: memory_limit

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/cloud/includes/htmlsettings.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cloud/cloud.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cloud/panels/users_actions.php:3
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/cloud/shortcodes/user_files_table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cloud/shortcodes/shortcodes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/cloud/shortcodes/user_files_table.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cloud/shortcodes/user_files_table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cloud/handler.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cloud/panels/users_quota.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/cloud/shortcodes/user_files_upload.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcloud
    • > Network (severe)
    https://www.google.com/uds/api/visualization/1.1/b286575f41699923b257980af3c9fe9d/format+it,default+it,ui+it,corechart+it.I.js - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wpcloud
    • > Javascript (severe) in unknown
    https://www.google.com/jsapi?autoload={ 143:268 Uncaught Error: Autoload failed with: SyntaxError: Unexpected end of JSON input
    • > GET request to /wp-admin/admin.php?page=wpcloud
    • > Console-api (warning) in unknown
    https://www.google.com/jsapi 147:47 " Attempting to load version '1.1' of Google Charts, but the previously loaded '1' will be used instead."
    • > GET request to /wp-admin/admin.php?page=wpcloud_settings
    • > Network (severe)
    https://www.comune.sanpellegrinoterme.bg.it/wp-content/plugins/amministrazione-trasparente/govconfig/panels/includes/mmsignature.png - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wpclod_iframe
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=wpclod_iframe 188:21 Uncaught TypeError: Cannot read properties of null (reading 'parentNode')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please add at least on tag
You can take inspiration from this readme.txt

cloud/cloud.php Passed 13 tests

The main file in "WP Cloud" v. 1.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
112 characters long description:
Give every user a personal web-space with WP Cloud, the most advanced plugin to make WordPress a cloud platform!

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
There were no executable files found in this plugin858 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1617436858

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 compressed PNG files occupy 0.08MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/icons/document-pdf.png0.65KB0.73KB0.00%
includes/icons/document-odt.png0.65KB0.62KB▼ 4.67%
includes/icons/document.png0.47KB0.44KB▼ 6.19%
includes/icons/document-music.png0.62KB0.56KB▼ 10.39%
includes/icons/document-excel.png0.66KB0.58KB▼ 11.31%