68% wc-download-products-from-aws-s3

Code Review | WC Download Products from AWS S3

WordPress plugin WC Download Products from AWS S3 scored68%from 54 tests.

About plugin

  • Plugin page: wc-download-produ...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.4
  • WordPress version: 6.3.1
  • First release: Feb 16, 2020
  • Latest release: Apr 16, 2020
  • Number of updates: 6
  • Update frequency: every 12.2 days
  • Top authors: Bragi26 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.42ms] Passed 4 tests

Server-side resources used by WC Download Products from AWS S3
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.80 ▼10.34
Dashboard /wp-admin3.34 ▲0.0455.55 ▲6.38
Posts /wp-admin/edit.php3.46 ▲0.1153.15 ▲2.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.66 ▼13.91
Media Library /wp-admin/upload.php3.25 ▲0.0235.64 ▲4.57

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,477 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WC Download Products from AWS S3
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲19614.77 ▲0.461.71 ▼0.3744.01 ▲0.86
Dashboard /wp-admin2,348 ▲1636.48 ▲0.60133.34 ▲19.5742.52 ▼4.85
Posts /wp-admin/edit.php2,251 ▲1623.48 ▲1.4455.23 ▲16.5434.78 ▼0.35
Add New Post /wp-admin/post-new.php1,533 ▼922.96 ▲4.71647.82 ▲28.5535.96 ▼26.41
Media Library /wp-admin/upload.php1,393 ▲84.16 ▼0.0477.66 ▼22.1543.00 ▼0.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-download-products-from-aws-s3/vendor/mtdowling/jmespath.php/bin/jp.php
    • > /wp-content/plugins/wc-download-products-from-aws-s3/vendor/bin/jp.php
  • 606× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/AppSync/Exception/AppSyncException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/DataPipeline/DataPipelineClient.php:48
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/guzzlehttp/psr7/src/DroppingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/EBS/EBSClient.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/ConnectParticipant/ConnectParticipantClient.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/ResourceGroupsTaggingAPI/ResourceGroupsTaggingAPIClient.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/XRay/Exception/XRayException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/Ssm/SsmClient.php:254
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/Redshift/RedshiftClient.php:182
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/wc-download-products-from-aws-s3/vendor/aws/aws-sdk-php/src/Redshift/Exception/RedshiftException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

wc-download-products-from-aws-s3/wc-download-products-from-aws-s3.php 92% from 13 tests

The principal PHP file in "WC Download Products from AWS S3" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.9" instead of "3.6.0")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Almost there! Just fix the following issues
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wc-download-products-from-aws-s3/vendor/bin/jp.php.bat
45,880 lines of code in 1,465 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,4136,42830,64935,642
JSON30806,581
Markdown141,08903,438
JavaScript1251083
reStructuredText1352959
YAML14027
make210022
XML13014
Dockerfile18010
DOS Batch1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.51
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces478
Interfaces38
Traits17
Classes709
▷ Abstract classes111.55%
▷ Concrete classes69898.45%
▷ Final classes131.86%
Methods2,302
▷ Static methods36916.03%
▷ Public methods1,61270.03%
▷ Protected methods1155.00%
▷ Private methods57524.98%
Functions458
▷ Named functions11925.98%
▷ Anonymous functions33974.02%
Constants205
▷ Global constants62.93%
▷ Class constants19997.07%
▷ Public constants199100.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