88% wpcloudhosting

Code Review | Host your blog on S3 or Google Cloud Storage

WordPress plugin Host your blog on S3 or Google Cloud Storage scored 88% from 54 tests.

About plugin

  • Plugin page: wpcloudhosting
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 5.8.1
  • First release: May 16, 2015
  • Latest release: May 22, 2015
  • Number of updates: 8
  • Update frequency: every 1.4 days
  • Top authors: sircelj.m (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,149 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.54MB] [CPU: ▼137.64ms] Passed 4 tests

Analyzing server-side resources used by Host your blog on S3 or Google Cloud Storage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.35 ▲0.6343.54 ▲20.13
Dashboard /wp-admin3.58 ▲0.5352.87 ▼0.62
Posts /wp-admin/edit.php3.70 ▲0.5956.01 ▲1.62
Add New Post /wp-admin/post-new.php5.94 ▲0.51101.35 ▼560.88
Media Library /wp-admin/upload.php3.53 ▲0.5344.65 ▲9.32

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 1,524 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Host your blog on S3 or Google Cloud Storage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.98 ▼0.0110.07 ▼0.8846.25 ▼7.85
Dashboard /wp-admin2,991 ▲576.07 ▼0.07156.28 ▼16.75112.67 ▼5.79
Posts /wp-admin/edit.php2,763 ▲242.74 ▲0.0472.93 ▲1.0294.77 ▲10.20
Add New Post /wp-admin/post-new.php1,631 ▲5013.74 ▼6.68311.93 ▼104.87117.05 ▲4.46
Media Library /wp-admin/upload.php1,772 ▼355.05 ▲0.02167.32 ▼5.97127.16 ▲6.68

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
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 9× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/index.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/service-account.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/simple-query.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/user-example.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/batch.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/simplefileupload.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/fileupload.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/idtoken.php
    • > /wp-content/plugins/wpcloudhosting/gcs/google-api-php-client-master/examples/multi-api.php
  • 1259× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Exception\\ServiceResponseException' not found in wp-content/plugins/wpcloudhosting/aws/Aws/Kms/Exception/KmsException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/wpcloudhosting/aws/Monolog/Formatter/ElasticaFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\ImportExport\\Exception\\ImportExportException' not found in wp-content/plugins/wpcloudhosting/aws/Aws/ImportExport/Exception/BucketPermissionException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\DynamoDb\\Exception\\DynamoDbException' not found in wp-content/plugins/wpcloudhosting/aws/Aws/DynamoDb/Exception/ConditionalCheckFailedException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\ElastiCache\\Exception\\ElastiCacheException' not found in wp-content/plugins/wpcloudhosting/aws/Aws/ElastiCache/Exception/ReplicationGroupNotFoundException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Common\\Facade\\FacadeInterface' not found in wp-content/plugins/wpcloudhosting/aws/Aws/Common/Facade/Facade.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Exception\\ServiceResponseException' not found in wp-content/plugins/wpcloudhosting/aws/Aws/Ssm/Exception/SsmException.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Enum' not found in wp-content/plugins/wpcloudhosting/aws/Aws/ElasticBeanstalk/Enum/ConfigurationDeploymentStatus.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Doctrine\\Common\\Cache\\CacheProvider' not found in wp-content/plugins/wpcloudhosting/aws/Doctrine/Common/Cache/MemcachedCache.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/wpcloudhosting/aws/Monolog/Handler/FleepHookHandler.php:25

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: cache, google, static, s3, cloud...

wpcloudhosting/index.php 92% from 13 tests

The primary PHP file in "Host your blog on S3 or Google Cloud Storage" version 0.0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpcloudhosting.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected396,586 lines of code in 1,511 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,49620,83074,813395,186
Markdown628101,128
XML22841122
CSS1161483
JSON40039
YAML16222
INI1016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.95
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces202
Interfaces86
Traits2
Classes4,275
▷ Abstract classes481.12%
▷ Concrete classes4,22798.88%
▷ Final classes10.02%
Methods27,034
▷ Static methods2901.07%
▷ Public methods26,29997.28%
▷ Protected methods5522.04%
▷ Private methods1830.68%
Functions124
▷ Named functions3528.23%
▷ Anonymous functions8971.77%
Constants1,372
▷ Global constants10.07%
▷ Class constants1,37199.93%
▷ Public constants1,371100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/sprites.png35.65KB10.91KB▼ 69.39%