84% bucket-browser-for-aws-s3

Code Review | AWS S3 Bucket Browser

WordPress plugin AWS S3 Bucket Browser scored 84% from 54 tests.

About plugin

  • Plugin page: bucket-browser-fo...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2016
  • Latest release: Jun 5, 2019
  • Number of updates: 6
  • Update frequency: every 156.0 days
  • Top authors: duplaja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 2,515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼5.02ms] Passed 4 tests

Server-side resources used by AWS S3 Bucket Browser
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2943.36 ▲4.58
Dashboard /wp-admin3.65 ▲0.3545.71 ▼13.01
Posts /wp-admin/edit.php3.70 ▲0.3548.68 ▲0.43
Add New Post /wp-admin/post-new.php6.17 ▲0.2893.12 ▼10.02
Media Library /wp-admin/upload.php3.51 ▲0.2835.59 ▲2.52
S3 Browser /wp-admin/tools.php?page=s3-browse-settings3.4831.96

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 299 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for AWS S3 Bucket Browser
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.64 ▼0.851.65 ▼0.2440.32 ▼5.41
Dashboard /wp-admin2,210 ▲224.84 ▼0.95107.15 ▼4.2541.08 ▲0.50
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0140.24 ▼2.4636.60 ▼0.18
Add New Post /wp-admin/post-new.php1,545 ▼018.49 ▲0.24597.32 ▼11.7950.37 ▼2.37
Media Library /wp-admin/upload.php1,386 ▼24.21 ▲0.0395.95 ▼2.2442.45 ▼3.19
S3 Browser /wp-admin/tools.php?page=s3-browse-settings8862.0222.9127.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 116× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/WorkSpaces/Exception/WorkSpacesException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\ResultInterface' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/Result.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/GuzzleHttp/Psr7/Response.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Signature\\SignatureInterface' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/Signature/AnonymousSignature.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/DirectoryService/DirectoryServiceClient.php:54
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/GuzzleHttp/Promise/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/IotDataPlane/Exception/IotDataPlaneException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\CacheInterface' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/LruArrayCache.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/Waiter.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/bucket-browser-for-aws-s3/aws/Aws/Support/Exception/SupportException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: aws, s3, download, amazon, folders...

bucket-browser-for-aws-s3/bucket-browser-for-aws-s3.php Passed 13 tests

The main PHP file in "AWS S3 Bucket Browser" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
31 characters long description:
A custom Amazon S3 File Browser

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin19,697 lines of code in 293 files:
LanguageFilesBlank linesComment linesLines of code
PHP2873,3309,62117,658
Markdown434501,405
CSS17217407
JavaScript114530227

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.77
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces51
Interfaces20
Traits6
Classes192
▷ Abstract classes63.12%
▷ Concrete classes18696.88%
▷ Final classes63.23%
Methods1,340
▷ Static methods14110.52%
▷ Public methods91968.58%
▷ Protected methods664.93%
▷ Private methods35526.49%
Functions300
▷ Named functions7224.00%
▷ Anonymous functions22876.00%
Constants95
▷ Global constants00.00%
▷ Class constants95100.00%
▷ Public constants95100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected