73% wp-s3

Code Review | Wordpress Amazon S3 Plugin

WordPress plugin Wordpress Amazon S3 Plugin scored73%from 54 tests.

About plugin

  • Plugin page: wp-s3
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 20, 2010
  • Latest release: Mar 17, 2023
  • Number of updates: 25
  • Update frequency: every 186.1 days
  • Top authors: imthiaz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10,876 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▲0.41ms] Passed 4 tests

An overview of server-side resources used by Wordpress Amazon S3 Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0735.36 ▼5.30
Dashboard /wp-admin3.31 ▲0.0147.99 ▲1.51
Posts /wp-admin/edit.php3.36 ▲0.0150.17 ▲4.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.74 ▲1.17
Media Library /wp-admin/upload.php3.24 ▲0.0137.36 ▲7.11
Amazon S3 /wp-admin/plugins.php?page=s3plugin-options3.3031.10

Server storage [IO: ▲9.48MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 144 files (2.25KB) outside of "wp-content/plugins/wp-s3/" and "wp-content/uploads/"
    • (new file) wp-content/s3temp/0/0b/0bb/index.php
    • (new file) wp-content/s3temp/0/00/003/index.php
    • (new file) wp-content/s3temp/0/0e/0e0/index.php
    • (new file) wp-content/s3temp/0/0b/0bb/0bbbb99686a33f1519254d15093f4eab.txt
    • (new file) wp-content/s3temp/0/0e/0e0/0e00b15b7ce51bf87d96b9e8a28444c4.txt
    • (new file) wp-content/s3temp/0/00/index.php
    • (new file) wp-content/s3temp/0/0b/index.php
    • (new file) wp-content/s3temp/0/00/006/006d417d3dadd84923ed16aad76f15b9.txt
    • (new file) wp-content/s3temp/0/00/003/0038a73c6c631ecfcb8ae8676729399d.txt
    • (new file) wp-content/s3temp/0/00/006/index.php
    • ...
Filesystem: 897 new files
Database: 1 new table, 6 new options
New tables
wp_s3_image_queue
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Amazon S3 Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.48 ▲0.082.04 ▲0.2843.70 ▲0.28
Dashboard /wp-admin2,213 ▲315.85 ▼0.01102.49 ▼0.1238.95 ▼4.74
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0538.92 ▲1.0334.45 ▼0.93
Add New Post /wp-admin/post-new.php1,539 ▲1923.30 ▼0.05640.49 ▼47.8355.27 ▼3.95
Media Library /wp-admin/upload.php1,395 ▲44.20 ▼0.0698.36 ▼4.9743.68 ▼3.56
Amazon S3 /wp-admin/plugins.php?page=s3plugin-options1,1572.1822.8127.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_s3_image_queue
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 377× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/wp-s3/aws/GuzzleHttp/Pool.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/wp-s3/aws/Aws/StorageGateway/Exception/StorageGatewayException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/wp-s3/aws/Aws/CloudWatchLogs/Exception/CloudWatchLogsException.php:9
    • > PHP Fatal error
      Trait 'Aws\\Api\\Parser\\PayloadParserTrait' not found in wp-content/plugins/wp-s3/aws/Aws/Api/ErrorParser/XmlErrorParser.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-s3/s3-options.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/wp-s3/aws/GuzzleHttp/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/wp-s3/aws/Aws/Waiter.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Crypto\\MetadataStrategyInterface' not found in wp-content/plugins/wp-s3/aws/Aws/S3/Crypto/HeadersMetadataStrategy.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/wp-s3/aws/Aws/S3/Transfer.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Api\\Shape' not found in wp-content/plugins/wp-s3/aws/Aws/Api/ListShape.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: amazon, uploads, performance, bandwidth, s3...

wp-s3/s3.php 85% from 13 tests

The principal PHP file in "Wordpress Amazon S3 Plugin" v. 1.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 305 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-s3.php" instead of "s3.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin29,422 lines of code in 895 files:
LanguageFilesBlank linesComment linesLines of code
PHP8914,97021,39826,610
Markdown41,04602,812

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.23
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces286
Interfaces27
Traits13
Classes476
▷ Abstract classes81.68%
▷ Concrete classes46898.32%
▷ Final classes102.14%
Methods1,855
▷ Static methods21911.81%
▷ Public methods1,29269.65%
▷ Protected methods904.85%
▷ Private methods47325.50%
Functions364
▷ Named functions6718.41%
▷ Anonymous functions29781.59%
Constants146
▷ Global constants00.00%
▷ Class constants146100.00%
▷ Public constants146100.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
No PNG files were detected