74% tcs3

Code Review | tcS3

WordPress plugin tcS3 scored 74% from 53 tests.

About plugin

  • Plugin page: tcs3
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.4
  • WordPress version: 5.8.1
  • First release: Sep 11, 2014
  • Latest release: Feb 15, 2018
  • Number of updates: 31
  • Update frequency: every 40.5 days
  • Top authors: tcmccarthy1 (100%)

Code review

53 tests

User reviews

6 reviews

Install metrics

200+ active / 3,113 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.52MB] [CPU: ▼333.21ms] Passed 4 tests

Analyzing server-side resources used by tcS3
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼0.648.39 ▼14.09
Dashboard /wp-admin2.13 ▼0.939.31 ▼33.47
Posts /wp-admin/edit.php2.13 ▼0.988.46 ▼32.20
Add New Post /wp-admin/post-new.php2.13 ▼3.309.69 ▼1,239.64
Media Library /wp-admin/upload.php2.13 ▼0.888.35 ▼27.53

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 1,320 new files
Database: no new tables, 1 new option
New WordPress options
tcS3_version

Browser metrics Passed 4 tests

Checking browser requirements for tcS3
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲7815.99 ▲0.377.44 ▼0.9446.79 ▼1.43
Dashboard /wp-admin2,961 ▲1116.48 ▲0.57146.74 ▲10.28105.27 ▲8.47
Posts /wp-admin/edit.php2,741 ▲352.97 ▲0.2868.07 ▼11.2588.75 ▲3.93
Add New Post /wp-admin/post-new.php1,615 ▲13421.67 ▲3.18263.62 ▼88.59105.06 ▲1.23
Media Library /wp-admin/upload.php1,807 ▲355.36 ▲0.32139.46 ▼17.68116.10 ▲3.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/tcs3/inc/base.class.php+51
    Undefined variable: network_options
  • This plugin does not fully uninstall, leaving 1 option in the database
    • tcS3_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 386× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/S3/ObjectUploader.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/DataPipeline/Exception/DataPipelineException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Crypto\\AesStreamInterface' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/Crypto/AesGcmEncryptingStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/MachineLearning/MachineLearningClient.php:69
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Multipart\\AbstractUploader' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/S3/MultipartUploader.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/Shield/Exception/ShieldException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Credentials\\CredentialsInterface' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/Credentials/Credentials.php:8
    • > PHP Fatal error
      Trait 'Aws\\Api\\Parser\\PayloadParserTrait' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/Api/ErrorParser/XmlErrorParser.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/Shield/ShieldClient.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/tcs3/vendor/aws/aws-sdk-php/src/CloudFront/Exception/CloudFrontException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: media, multisite, amazon, s3, aws...

tcs3/tcS3.php 92% from 13 tests

Analyzing the main PHP file in "tcS3" version 2.1.1
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("tcs3.php" instead of "tcS3.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected58,340 lines of code in 1,107 files:
LanguageFilesBlank linesComment linesLines of code
PHP9456,92924,30338,495
JSON329011,650
Markdown141,12003,854
JavaScript903384822,507
CSS896951,033
PO File9218275663
reStructuredText1352959
Sass31022
make210022
YAML25021
XML13014

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.16
▷ Minimum class complexity1.00
▷ Maximum class complexity446.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces287
Interfaces27
Traits13
Classes568
▷ Abstract classes81.41%
▷ Concrete classes56098.59%
▷ Final classes101.79%
Methods2,445
▷ Static methods2329.49%
▷ Public methods1,69069.12%
▷ Protected methods27711.33%
▷ Private methods47819.55%
Functions402
▷ Named functions10024.88%
▷ Anonymous functions30275.12%
Constants158
▷ Global constants63.80%
▷ Class constants15296.20%
▷ Public constants152100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin