78% twitchpress-login-extension

Code Review | TwitchPress Login Extension

WordPress plugin TwitchPress Login Extension scored78%from 54 tests.

About plugin

  • Plugin page: twitchpress-login...
  • Plugin version: 1.9.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Jul 9, 2017
  • Latest release: Feb 4, 2019
  • Number of updates: 33
  • Update frequency: every 28.2 days
  • Top authors: Ryan Bayne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,664 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by TwitchPress Login Extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0049.36 ▲8.18
Dashboard /wp-admin3.31 ▲0.0048.77 ▼3.02
Posts /wp-admin/edit.php3.36 ▲0.0049.53 ▲0.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.67 ▼13.66
Media Library /wp-admin/upload.php3.23 ▲0.0037.35 ▼1.73

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by TwitchPress Login Extension
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.002.01 ▲0.3144.09 ▲3.55
Dashboard /wp-admin2,195 ▲155.62 ▼0.0690.87 ▲3.9943.95 ▼1.33
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0035.83 ▲0.7632.94 ▼6.47
Add New Post /wp-admin/post-new.php1,529 ▲323.76 ▲0.61652.40 ▼5.5652.68 ▼2.34
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0193.17 ▼11.5443.58 ▼2.70

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/twitchpress-login-extension/twitchpress-login-extension.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/twitchpress-login-extension/class.twitchpress-login-helix.php:181
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/twitchpress-login-extension/class.twitchpress-login-kraken.php:181

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: twitch login, twitch, twitchtv, twitch register, twitchpress...

twitchpress-login-extension/twitchpress-login-extension.php 85% from 13 tests

The entry point to "TwitchPress Login Extension" version 1.9.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,816 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP105928421,758
CSS17256
JavaScript1212

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity33.71
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods93
▷ Static methods1819.35%
▷ Public methods7580.65%
▷ Protected methods66.45%
▷ Private methods1212.90%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/connect.png2.35KB1.96KB▼ 16.48%