68% s3cloud

Code Review | s3 cloud File Manager

WordPress plugin s3 cloud File Manager scored68%from 54 tests.

About plugin

  • Plugin page: s3cloud
  • Plugin version: 2.21
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 4, 2022
  • Latest release: Oct 17, 2023
  • Number of updates: 97
  • Update frequency: every 3.9 days
  • Top authors: sminozzi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,311 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▲2.03ms] Passed 4 tests

Server-side resources used by s3 cloud File Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3250.57 ▲6.89
Dashboard /wp-admin3.56 ▲0.2161.80 ▼5.29
Posts /wp-admin/edit.php3.67 ▲0.3170.70 ▲21.14
Add New Post /wp-admin/post-new.php6.14 ▲0.25102.34 ▼8.39
Media Library /wp-admin/upload.php3.48 ▲0.2551.92 ▲14.91
S3 Cloud /wp-admin/tools.php?page=s3cloud_admin_page3.4640.88

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

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Total filesystem usage must be limited to 25MB (currently using 29.47MB)
Filesystem: 3,135 new files
Database: 2 new tables, 8 new options
New tables
wp_s3cloud_copy_files
wp_s3cloud_copy
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
s3cloud_was_activated
can_compress_scripts
bill_show_warnings
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for s3 cloud File Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13014.35 ▼0.082.16 ▲0.3941.62 ▼1.63
Dashboard /wp-admin2,258 ▲815.78 ▲0.1891.57 ▼0.4641.92 ▲1.86
Posts /wp-admin/edit.php2,160 ▲602.28 ▲0.3143.62 ▲5.6333.85 ▼2.32
Add New Post /wp-admin/post-new.php1,547 ▲1923.11 ▼0.04665.72 ▼35.1550.89 ▼2.87
Media Library /wp-admin/upload.php1,457 ▲574.41 ▲0.10114.47 ▲7.1447.75 ▲2.46
S3 Cloud /wp-admin/tools.php?page=s3cloud_admin_page9292.6966.0356.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_s3cloud_copy
    • wp_s3cloud_copy_files
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • s3cloud_was_activated
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • bill_show_warnings

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/s3cloud/functions/tree_data_filesys_cloud.php
    • > /wp-content/plugins/s3cloud/functions/tree_data_filesys.php
    • > /wp-content/plugins/s3cloud/dashboard/contabo.php
    • > /wp-content/plugins/s3cloud/includes/checkup/class_bill_catch_errors.php
    • > /wp-content/plugins/s3cloud/s3api/download.php
    • > /wp-content/plugins/s3cloud/dashboard/dashboard.php
    • > /wp-content/plugins/s3cloud/s3cloud.php
    • > /wp-content/plugins/s3cloud/functions/functions.php
    • > /wp-content/plugins/s3cloud/dashboard/debug.php
    • > /wp-content/plugins/s3cloud/dashboard/transf.php
  • 194× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'Aws\\Crypto\\Polyfill\eedsTrait' not found in wp-content/plugins/s3cloud/vendor/Aws/Crypto/Polyfill/AesGcm.php on line 20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/s3cloud/vendor/GuzzleHttp/Psr7/LazyOpenStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/s3cloud/vendor/Aws/S3/BatchDelete.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\MonitoringEventsInterface' not found in wp-content/plugins/s3cloud/vendor/Aws/Exception/IncalculablePayloadException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AbstractConfigurationProvider' not found in wp-content/plugins/s3cloud/vendor/Aws/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\MultipartUploader' not found in wp-content/plugins/s3cloud/vendor/Aws/S3/Crypto/S3EncryptionMultipartUploaderV2.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AbstractConfigurationProvider' not found in wp-content/plugins/s3cloud/vendor/Aws/Retry/ConfigurationProvider.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/s3cloud/vendor/GuzzleHttp/Promise/CancellationException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/s3cloud/vendor/Psr/Http/Message/ServerRequestInterface.php:43
    • > PHP Fatal error
      Trait 'Aws\\S3\\Crypto\\CryptoParamsTrait' not found in wp-content/plugins/s3cloud/vendor/Aws/S3/Crypto/CryptoParamsTraitV2.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Dashboard), #2 (Dashboard Settings Tab), #3 (Debug Tab), #4 (S3 Browse Tab), #5 (Transfer Folders to/from Server and Cloud)
The official readme.txt is a good inspiration

s3cloud/s3cloud.php Passed 13 tests

The entry point to "s3 cloud File Manager" version 2.21 is a PHP file that has certain tags in its header comment area
115 characters long description:
Browser for Contabo S3 Cloud. This plugin connect you with your Contabo S3 Object Storage, using S3-compatible API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin109,648 lines of code in 3,110 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,2336,89318,58239,398
JSON70023,934
JavaScript353,8332,29815,614
CSS87686212,719
HTML1507,286
SVG1,812006,230
Sass1403,734
Markdown71540535
Handlebars3110102
YAML38096

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.60
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces52
Interfaces47
Traits24
Classes287
▷ Abstract classes134.53%
▷ Concrete classes27495.47%
▷ Final classes238.39%
Methods2,285
▷ Static methods39417.24%
▷ Public methods1,57969.10%
▷ Protected methods1235.38%
▷ Private methods58325.51%
Functions489
▷ Named functions14429.45%
▷ Anonymous functions34570.55%
Constants220
▷ Global constants125.45%
▷ Class constants20894.55%
▷ Public constants208100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/file.png0.56KB0.81KB0.00%
images/folder.png0.50KB0.56KB0.00%
images/logo.png13.20KB6.54KB▼ 50.47%
includes/checkup/bell.png1.07KB0.27KB▼ 74.45%