84% online-indicator-for-twitch

Code Review | Online Indicator For Twitch

WordPress plugin Online Indicator For Twitch scored84%from 54 tests.

About plugin

  • Plugin page: online-indicator-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: May 25, 2020
  • Latest release: Sep 29, 2023
  • Number of updates: 21
  • Update frequency: every 58.1 days
  • Top authors: shapeyourbits (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,175 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.93ms] Passed 4 tests

An overview of server-side resources used by Online Indicator For Twitch
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1043.76 ▲2.60
Dashboard /wp-admin3.43 ▲0.0849.79 ▼27.58
Posts /wp-admin/edit.php3.54 ▲0.1450.59 ▲1.44
Add New Post /wp-admin/post-new.php6.01 ▲0.0892.86 ▼7.31
Media Library /wp-admin/upload.php3.35 ▲0.0840.21 ▲1.72

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Online Indicator For Twitch
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.71 ▲0.351.98 ▲0.1143.08 ▼3.26
Dashboard /wp-admin2,215 ▲385.61 ▼0.0387.31 ▼12.1843.39 ▲1.59
Posts /wp-admin/edit.php2,118 ▲182.01 ▲0.0737.58 ▼2.1235.78 ▼1.15
Add New Post /wp-admin/post-new.php1,418 ▼10818.11 ▼5.50612.60 ▼76.7457.34 ▲0.80
Media Library /wp-admin/upload.php1,420 ▲204.22 ▲0.08100.92 ▼15.2142.87 ▼8.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/online-indicator-for-twitch/online-indicator-for-twitch.php:157

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: twitch tv, twitch stream status, streaming, twitch, twitch online status...

online-indicator-for-twitch/online-indicator-for-twitch.php 92% from 13 tests

The main PHP script in "Online Indicator For Twitch" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin253 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13959222
CSS11031

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin