67% amazon-s3-and-cloudfront

Code Review | WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage

WordPress plugin WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage scored67%from 54 tests.

About plugin

  • Plugin page: amazon-s3-and-clo...
  • Plugin version: 3.2.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2013
  • Latest release: Aug 24, 2023
  • Number of updates: 127
  • Update frequency: every 30.4 days
  • Top authors: deliciousbrains (72.44%)bradt (28.35%)

Code review

54 tests

User reviews

98 reviews

Install metrics

50,000+ active /1,927,227 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.63MB] [CPU: ▲14.28ms] Passed 4 tests

This is a short check of server-side resources used by WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.96 ▲3.5065.75 ▲20.89
Dashboard /wp-admin6.98 ▲3.6377.52 ▲9.88
Posts /wp-admin/edit.php7.09 ▲3.7469.59 ▲21.57
Add New Post /wp-admin/post-new.php9.60 ▲3.72106.68 ▲4.97
Media Library /wp-admin/upload.php6.90 ▲3.6762.32 ▲21.36
WP Offload Media /wp-admin/options-general.php?page=amazon-s3-and-cloudfront7.10106.52

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

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/amazon-s3-and-cloudfront/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 1,511 new files
Database: 1 new table, 8 new options
New tables
wp_as3cf_items
New WordPress options
widget_theysaidso_widget
tantan_wordpress_s3
widget_recent-comments
db_upgraded
theysaidso_admin_options
as3cf_schema_version
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.40 ▼0.151.77 ▼0.0243.52 ▼0.39
Dashboard /wp-admin2,232 ▲294.85 ▼1.04113.33 ▲5.5341.89 ▼0.80
Posts /wp-admin/edit.php2,111 ▲112.03 ▲0.0236.30 ▼0.1134.77 ▲0.05
Add New Post /wp-admin/post-new.php1,536 ▼1222.20 ▼0.95617.06 ▼109.0751.07 ▼9.57
Media Library /wp-admin/upload.php1,423 ▲204.29 ▲0.10103.09 ▲0.8744.00 ▼7.52
WP Offload Media /wp-admin/options-general.php?page=amazon-s3-and-cloudfront1,2963.3247.6447.18

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 1 table in the database
    • wp_as3cf_items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • tantan_wordpress_s3
    • theysaidso_admin_options
    • as3cf_schema_version
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/amazon-s3-and-cloudfront/view/settings.php
    • > /wp-content/plugins/amazon-s3-and-cloudfront/view/notice.php
  • 620× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WP_Offload_Media\\Aws3\\Aws\\Crypto\\Cipher\\CipherMethod' not found in wp-content/plugins/amazon-s3-and-cloudfront/vendor/Aws3/Aws/Crypto/Cipher/Cbc.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'DeliciousBrains\\WP_Offload_Media\\Settings\\Exceptions\\Domain_Check_Exception' not found in wp-content/plugins/amazon-s3-and-cloudfront/classes/settings/exceptions/unresolveable-hostname-exception.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WP_Offload_Media\\Gcp\\Google\\Auth\\FetchAuthTokenInterface' not found in wp-content/plugins/amazon-s3-and-cloudfront/vendor/Gcp/google/auth/src/FetchAuthTokenCache.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WP_Offload_Media\\Gcp\\Google\\Cloud\\Core\\Batch\\ClosureSerializerInterface' not found in wp-content/plugins/amazon-s3-and-cloudfront/vendor/Gcp/google/cloud-core/src/Batch/OpisClosureSerializer.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WP_Offload_Media\\Gcp\\Google\\Cloud\\Core\\Report\\MetadataProviderInterface' not found in wp-content/plugins/amazon-s3-and-cloudfront/vendor/Gcp/google/cloud-core/src/Report/EmptyMetadataProvider.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WP_Offload_Media\\Aws3\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/amazon-s3-and-cloudfront/vendor/Aws3/GuzzleHttp/Psr7/DroppingStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'DeliciousBrains\\WP_Offload_Media\\Providers\\Storage\\Storage_Provider' not found in wp-content/plugins/amazon-s3-and-cloudfront/classes/providers/storage/gcp-provider.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'DeliciousBrains\\WP_Offload_Media\\Gcp\\Brick\\Math\\Exception\\MathException' not found in wp-content/plugins/amazon-s3-and-cloudfront/vendor/Gcp/brick/math/src/Exception/RoundingNecessaryException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AS3CF_Filter' not found in wp-content/plugins/amazon-s3-and-cloudfront/classes/filters/as3cf-s3-to-local.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WP_Offload_Media\\Gcp\\Ramsey\\Uuid\\Converter\\TimeConverterInterface' not found in wp-content/plugins/amazon-s3-and-cloudfront/vendor/Gcp/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php:30

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Screenshots: Add a description for screenshot #4 in amazon-s3-and-cloudfront/assets to your readme.txt
You can take inspiration from this readme.txt

amazon-s3-and-cloudfront/wordpress-s3.php 85% from 13 tests

The main file in "WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage" v. 3.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 198 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("amazon-s3-and-cloudfront.php" instead of "wordpress-s3.php")

Code Analysis 97% from 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 detected136,521 lines of code in 1,460 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,1806,63061,55274,208
JavaScript214,2231,57427,641
Markdown466,046016,777
JSON27007,244
CSS162531913,512
Svelte6048583,251
Sass16569492,836
SVG8900831
C23570144
m41111438
C/C++ Header1101825
Bourne Shell141614

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.56
▷ Minimum class complexity1.00
▷ Maximum class complexity536.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces152
Interfaces142
Traits82
Classes824
▷ Abstract classes455.46%
▷ Concrete classes77994.54%
▷ Final classes11514.76%
Methods6,952
▷ Static methods1,03614.90%
▷ Public methods5,20274.83%
▷ Protected methods6369.15%
▷ Private methods1,11416.02%
Functions622
▷ Named functions8814.15%
▷ Anonymous functions53485.85%
Constants600
▷ Global constants91.50%
▷ Class constants59198.50%
▷ Public constants51687.31%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin