78% tce-sharing

Code Review | Tce Sharing

WordPress plugin Tce Sharing scored78%from 54 tests.

About plugin

  • Plugin page: tce-sharing
  • Plugin version: 2.0.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 6.3.1
  • First release: Mar 16, 2021
  • Latest release: Jan 18, 2022
  • Number of updates: 16
  • Update frequency: every 20.1 days
  • Top authors: tcenl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,834 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲7.03MB] [CPU: ▲31.04ms] 50% from 4 tests

This is a short check of server-side resources used by Tce Sharing
The following require your attention
  • RAM: Total memory usage must be kept under 10MB (currently 10.16MB on /wp-admin/admin.php?page=tce-sharing)
  • Extra RAM: The extra memory usage must be under 5MB (currently 7.03MB on /wp-admin/admin.php?page=tce-sharing)
PageMemory (MB)CPU Time (ms)
Home /10.48 ▲7.0276.17 ▲31.37
Dashboard /wp-admin10.34 ▲7.0475.85 ▲28.61
Posts /wp-admin/edit.php10.39 ▲7.0482.64 ▲30.48
Add New Post /wp-admin/post-new.php12.95 ▲7.07133.04 ▲34.37
Media Library /wp-admin/upload.php10.26 ▲7.0368.84 ▲33.70
Configuration /wp-admin/admin.php?page=tce-sharing-configuration10.1758.23
TCE Sharing /wp-admin/admin.php?page=tce-sharing10.1660.35

Server storage [IO: ▲21.97MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 1,945 new files
Database: no new tables, 16 new options
New WordPress options
widget_theysaidso_widget
tce-sharing-options-organisationName
db_upgraded
widget_recent-posts
tce-sharing-options-autoUploadDefault
tce-sharing-options-sourceName
tce-sharing-options-accessCode
tce-sharing-options-idToken
widget_recent-comments
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Tce Sharing: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲11813.51 ▼0.781.54 ▼0.8037.27 ▼11.65
Dashboard /wp-admin2,284 ▲965.91 ▲0.12100.38 ▼2.0138.76 ▼3.22
Posts /wp-admin/edit.php2,189 ▲1002.04 ▲0.0040.40 ▲0.3236.17 ▼3.67
Add New Post /wp-admin/post-new.php6,315 ▲4,78222.18 ▼1.07872.24 ▲219.4956.51 ▼4.86
Media Library /wp-admin/upload.php1,481 ▲934.27 ▲0.0297.38 ▼7.4140.14 ▼4.00
Configuration /wp-admin/admin.php?page=tce-sharing-configuration1,1204.0775.3339.00
TCE Sharing /wp-admin/admin.php?page=tce-sharing8572.0427.4726.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tce-sharing/Views/TceSharingMain/partials/view-header.php
    • > /wp-content/plugins/tce-sharing/Autoload/mtdowling/jmespath.php/bin/jp.php
    • > /wp-content/plugins/tce-sharing/Views/Components/GutenbergTceSharingComponent/partials/auto-upload-post-form.php
    • > /wp-content/plugins/tce-sharing/tce-sharing.php
    • > /wp-content/plugins/tce-sharing/Views/TceSharingMain/partials/view-footer.php
  • 799× 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/tce-sharing/Autoload/aws/aws-sdk-php/src/Route53/Exception/Route53Exception.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/CloudSearchDomain/CloudSearchDomainClient.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/Kms/KmsClient.php:102
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/Budgets/Exception/BudgetsException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/ServerlessApplicationRepository/ServerlessApplicationRepositoryClient.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/Appflow/Exception/AppflowException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/ServiceDiscovery/Exception/ServiceDiscoveryException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/Organizations/Exception/OrganizationsException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/tce-sharing/Autoload/aws/aws-sdk-php/src/ApplicationDiscoveryService/ApplicationDiscoveryServiceClient.php:59
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/tce-sharing/Autoload/guzzlehttp/guzzle/src/Exception/GuzzleException.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: content exchange, sharing, syndication, tce

tce-sharing/tce-sharing.php Passed 13 tests

The primary PHP file in "Tce Sharing" version 2.0.9 is used by WordPress to initiate all plugin functionality
109 characters long description:
Connect to the TCE market place and join other publishers to reach a larger target audience for your content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected59,847 lines of code in 1,926 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,84210,56647,31652,624
Markdown231,74905,028
JSON14601,568
CSS5441280
JavaScript3840207252
reStructuredText1352959
XML10015
SVG10012
make1409

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.46
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces612
Interfaces79
Traits33
Classes977
▷ Abstract classes202.05%
▷ Concrete classes95797.95%
▷ Final classes505.22%
Methods3,603
▷ Static methods52814.65%
▷ Public methods2,74376.13%
▷ Protected methods1484.11%
▷ Private methods71219.76%
Functions534
▷ Named functions14126.40%
▷ Anonymous functions39373.60%
Constants314
▷ Global constants123.82%
▷ Class constants30296.18%
▷ Public constants28795.03%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Views/TceSharingMain/images/tce-icon.png39.84KB14.00KB▼ 64.85%