10% twism

Code Review | TWISM for WooCommerce

WordPress plugin TWISM for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: twism
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 29, 2021
  • Latest release: Jun 7, 2023
  • Number of updates: 20
  • Update frequency: every 26.3 days
  • Top authors: twismwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,166 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > User error in wp-content/plugins/twism/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16.

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.27ms] Passed 4 tests

Server-side resources used by TWISM for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.71 ▼8.23
Dashboard /wp-admin3.31 ▲0.0045.96 ▼4.47
Posts /wp-admin/edit.php3.36 ▲0.0046.83 ▲3.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.71 ▲0.43
Media Library /wp-admin/upload.php3.23 ▲0.0035.09 ▲3.19

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 159 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

TWISM for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.60 ▼0.682.08 ▲0.1843.25 ▼0.34
Dashboard /wp-admin2,206 ▲215.91 ▲1.01106.20 ▼9.2041.05 ▼8.76
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0938.86 ▲1.7735.34 ▲0.12
Add New Post /wp-admin/post-new.php1,537 ▼518.24 ▼0.10601.44 ▼31.0354.38 ▲1.35
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0598.80 ▼0.3941.52 ▼2.14

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

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

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 everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 51× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/twism/vendor/guzzlehttp/promises/src/FulfilledPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/twism/vendor/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/twism/vendor/guzzlehttp/promises/src/Promise.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/twism/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16. in wp-content/plugins/twism/vendor/composer/platform_check.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/twism/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/twism/vendor/guzzlehttp/psr7/src/UploadedFile.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/twism/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/twism/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/twism/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Contributors: Plugin contributors not specified
  • Contributors: Please add at least on tag
The official readme.txt might help

twism/twism.php Passed 13 tests

The principal PHP file in "TWISM for WooCommerce" v. 1.4.0 is loaded by WordPress automatically on each request
51 characters long description:
A loyalty platform for local and online businesses.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin15,307 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1192,0105,67210,238
Markdown141,24103,613
JSON11001,439
make1409
YAML1007
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity13.27
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces10
Interfaces26
Traits3
Classes76
▷ Abstract classes00.00%
▷ Concrete classes76100.00%
▷ Final classes3444.74%
Methods743
▷ Static methods13918.71%
▷ Public methods62884.52%
▷ Protected methods40.54%
▷ Private methods11114.94%
Functions132
▷ Named functions4332.58%
▷ Anonymous functions8967.42%
Constants67
▷ Global constants45.97%
▷ Class constants6394.03%
▷ Public constants5282.54%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected