84% select-twitch-team

Code Review | Twitch Team Select

WordPress plugin Twitch Team Select scored84%from 54 tests.

About plugin

  • Plugin page: select-twitch-team
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 30, 2017
  • Latest release: Sep 30, 2017
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: friendlyngeeks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.19MB] [CPU: ▼25.94ms] Passed 4 tests

Analyzing server-side resources used by Twitch Team Select
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0626.98 ▼16.16
Dashboard /wp-admin3.14 ▼0.2132.12 ▼34.75
Posts /wp-admin/edit.php3.28 ▼0.0933.84 ▼20.30
Add New Post /wp-admin/post-new.php5.47 ▼0.4276.03 ▼32.55
Media Library /wp-admin/upload.php3.21 ▼0.0231.53 ▼2.41

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twitch Team Select
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲4414.39 ▲0.102.18 ▲0.1542.84 ▲2.94
Dashboard /wp-admin2,233 ▲595.59 ▲0.0292.40 ▲4.1841.00 ▲1.42
Posts /wp-admin/edit.php2,114 ▲142.03 ▲0.0536.36 ▲1.0136.24 ▼1.18
Add New Post /wp-admin/post-new.php1,547 ▲1823.08 ▼0.12674.98 ▲26.2663.08 ▲7.45
Media Library /wp-admin/upload.php1,436 ▲394.20 ▼0.06111.50 ▲12.5751.49 ▲5.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/select-twitch-team/twitch-team-select.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/select-twitch-team/includes/twitch-team-select-options.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
6 plugin tags: twitchtv, twitch, widget, team, embed...

select-twitch-team/twitch-team-select.php 92% from 13 tests

The main PHP script in "Twitch Team Select" version 0.0.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("select-twitch-team.php" instead of "twitch-team-select.php")

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 plugin1,025 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS83544344
HTML120282
JSON100106
PHP24050106
PO File1335185
JavaScript222075
SVG10027

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/teir2subteam.png8.63KB3.91KB▼ 54.74%
assets/teir3subteam.png8.11KB3.68KB▼ 54.65%
assets/teir1subteam.png8.14KB3.76KB▼ 53.77%