68% wp-twitter-threads

Code Review | WP Twitter Threads

WordPress plugin WP Twitter Threads scored68%from 54 tests.

About plugin

  • Plugin page: wp-twitter-threads
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8
  • WordPress version: 6.3.1
  • First release: Nov 20, 2020
  • Latest release: Jul 21, 2021
  • Number of updates: 6
  • Update frequency: every 40.7 days
  • Top authors: xuxu.fr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /617 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.50MB] [CPU: ▲1.32ms] Passed 4 tests

An overview of server-side resources used by WP Twitter Threads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5251.49 ▲5.75
Dashboard /wp-admin3.80 ▲0.4958.55 ▲1.51
Posts /wp-admin/edit.php3.85 ▲0.4952.84 ▼1.45
Add New Post /wp-admin/post-new.php6.41 ▲0.5293.13 ▼0.55
Media Library /wp-admin/upload.php3.72 ▲0.4947.02 ▲11.57

Server storage [IO: ▲7.49MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • Illegal file modification found: 2 files (0.99KB) outside of "wp-content/plugins/wp-twitter-threads/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (new file) wp-content/mu-plugins/wp-twitter-threads.php
Filesystem: 1,936 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
db_upgraded
wptt_install
widget_theysaidso_widget
wptt_plugin_version
widget_recent-comments
wptt_uninstall_date
wptt_install_date
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Twitter Threads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.44 ▼0.979.03 ▲6.9742.86 ▲0.01
Dashboard /wp-admin2,217 ▲375.60 ▼0.1085.43 ▼8.9540.11 ▼2.99
Posts /wp-admin/edit.php2,125 ▲222.05 ▲0.0035.95 ▼3.1433.42 ▼6.21
Add New Post /wp-admin/post-new.php6,440 ▲4,89427.70 ▲9.51860.52 ▲239.7336.96 ▼12.75
Media Library /wp-admin/upload.php1,428 ▲284.27 ▲0.02101.36 ▲2.5645.94 ▼1.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 10 options
    • wptt_uninstall_date
    • widget_recent-posts
    • wptt_plugin_version
    • wptt_install_date
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • wptt_install
    • can_compress_scripts

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 | 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 take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-twitter-threads/rewrites/wp-twitter-threads.php
    • > /wp-content/plugins/wp-twitter-threads/vendor/symfony/translation/Resources/bin/translation-status.php
  • 437× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/wp-twitter-threads/vendor/illuminate/contracts/Cache/Repository.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/wp-twitter-threads/vendor/composer/installers/src/Composer/Installers/Plugin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/wp-twitter-threads/vendor/symfony/css-selector/XPath/Extension/FunctionExtension.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/wp-twitter-threads/vendor/illuminate/support/Facades/Bus.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/wp-twitter-threads/vendor/guzzlehttp/promises/src/FulfilledPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-twitter-threads/vendor/symfony/css-selector/Tests/Parser/Shortcut/EmptyStringParserTest.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-twitter-threads/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-twitter-threads/vendor/guzzlehttp/psr7/src/LimitStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-twitter-threads/vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Doctrine\\Inflector\\WordInflector' not found in wp-content/plugins/wp-twitter-threads/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: thread, twitter, plugin

wp-twitter-threads/wp-twitter-threads.php Passed 13 tests

The primary PHP file in "WP Twitter Threads" version 1.1.0 is used by WordPress to initiate all plugin functionality
62 characters long description:
Twitter Thread Tool : Turn Twitter Threads into WordPress Post

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-twitter-threads/vendor/bin/carbon.bat
      • wp-content/plugins/wp-twitter-threads/vendor/nesbot/carbon/bin/carbon.bat
81,664 lines of code in 1,695 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,57213,19445,38566,109
JSON54007,021
Markdown391,63914,723
XSD392482,803
XML9101482
HTML300364
reStructuredText1747874
YAML43054
Bourne Shell13110
make1409
DOS Batch2008
CSS3404
JavaScript3003

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 139)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.12
▷ Minimum class complexity1.00
▷ Maximum class complexity293.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity139.00
Code structure
Namespaces118
Interfaces159
Traits37
Classes519
▷ Abstract classes183.47%
▷ Concrete classes50196.53%
▷ Final classes5110.18%
Methods4,570
▷ Static methods75816.59%
▷ Public methods4,01887.92%
▷ Protected methods3006.56%
▷ Private methods2525.51%
Functions589
▷ Named functions15125.64%
▷ Anonymous functions43874.36%
Constants279
▷ Global constants2910.39%
▷ Class constants25089.61%
▷ Public constants24698.40%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin