78% download-s3-content

Code Review | Download S3 Content

WordPress plugin Download S3 Content scored78%from 54 tests.

About plugin

  • Plugin page: download-s3-content
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 6.3.1
  • First release: Nov 2, 2017
  • Latest release: Nov 2, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: sankara097 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /724 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼8.29ms] Passed 4 tests

Analyzing server-side resources used by Download S3 Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.69 ▲4.42
Dashboard /wp-admin3.31 ▲0.0148.83 ▼4.74
Posts /wp-admin/edit.php3.36 ▲0.0144.85 ▼4.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.68 ▼26.66
Media Library /wp-admin/upload.php3.23 ▲0.0137.79 ▲3.12

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 706 new files
Database: 1 new table, 7 new options
New tables
wp_dcs3_content_downloader
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
s3_content_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Download S3 Content
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.28 ▼0.251.83 ▼0.3646.27 ▼4.35
Dashboard /wp-admin2,214 ▲345.51 ▼0.1287.52 ▼10.2940.84 ▼8.19
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0535.42 ▼6.6036.55 ▼7.26
Add New Post /wp-admin/post-new.php1,539 ▲2223.05 ▲4.16679.98 ▲232.3953.69 ▲10.72
Media Library /wp-admin/upload.php1,416 ▲164.20 ▲0.0393.84 ▼13.9746.11 ▲0.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • s3_content_db_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/download-s3-content/config.php
    • > /wp-content/plugins/download-s3-content/data.php
    • > /wp-content/plugins/download-s3-content/register.php
    • > /wp-content/plugins/download-s3-content/s3-content-downloader.php
    • > /wp-content/plugins/download-s3-content/s3-settings.php
  • 297× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/Sfn/Exception/SfnException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/Kinesis/Exception/KinesisException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/CognitoSync/Exception/CognitoSyncException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/Kinesis/KinesisClient.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\DynamoDb\\StandardSessionConnection' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/DynamoDb/LockingSessionConnection.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/download-s3-content/vendor/aws/GuzzleHttp/Psr7/NoSeekStream.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/Batch/Exception/BatchException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Api\\Parser\\AbstractRestParser' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/Api/Parser/RestJsonParser.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Api\\AbstractModel' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/Api/Service.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/download-s3-content/vendor/aws/Aws/CognitoIdentity/Exception/CognitoIdentityException.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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: s3, s3objects, aws, s3bucket, s3 downloader...

download-s3-content/s3-content-downloader.php 92% from 13 tests

The entry point to "Download S3 Content" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("download-s3-content.php" instead of "s3-content-downloader.php")

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
Good job! No executable or dangerous file extensions detected26,066 lines of code in 705 files:
LanguageFilesBlank linesComment linesLines of code
PHP7014,45317,89723,938
Markdown470402,128

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.71
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces217
Interfaces24
Traits9
Classes397
▷ Abstract classes61.51%
▷ Concrete classes39198.49%
▷ Final classes102.56%
Methods1,716
▷ Static methods20211.77%
▷ Public methods1,18869.23%
▷ Protected methods704.08%
▷ Private methods45826.69%
Functions361
▷ Named functions7119.67%
▷ Anonymous functions29080.33%
Constants130
▷ Global constants00.00%
▷ Class constants130100.00%
▷ Public constants130100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin