73% tubentertain

Code Review | TubEntertain

WordPress plugin TubEntertain scored 73% from 54 tests.

About plugin

  • Plugin page: tubentertain
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Mar 6, 2016
  • Number of updates: 86
  • Update frequency: every 6.8 days
  • Top authors: CreateSmart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,418 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.28MB] [CPU: ▼4.92ms] Passed 4 tests

Server-side resources used by TubEntertain
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2836.87 ▼4.13
Dashboard /wp-admin3.58 ▲0.2845.11 ▼6.46
Posts /wp-admin/edit.php3.69 ▲0.3445.04 ▲0.05
Add New Post /wp-admin/post-new.php6.16 ▲0.2791.16 ▼9.15
Media Library /wp-admin/upload.php3.50 ▲0.2745.05 ▲11.35

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 54 new files
Database: 5 new tables, 7 new options
New tables
wp__tubconfig
wp__tubtwitterApi
wp__tubuser
wp__tubprovideo
wp__tubfavorite
New WordPress options
TubentertainVersion
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by TubEntertain
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲27515.11 ▲0.8035.21 ▲33.6036.79 ▼2.97
Dashboard /wp-admin2,220 ▲354.90 ▲0.0294.68 ▼12.7765.31 ▲23.47
Posts /wp-admin/edit.php2,106 ▲171.98 ▼0.0734.72 ▼4.3232.11 ▼1.96
Add New Post /wp-admin/post-new.php1,677 ▲14422.30 ▼0.89732.22 ▲48.0151.08 ▼3.67
Media Library /wp-admin/upload.php1,393 ▲24.12 ▼0.05109.11 ▲11.0792.85 ▲45.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 5 tables
    • wp__tubtwitterApi
    • wp__tubconfig
    • wp__tubprovideo
    • wp__tubfavorite
    • wp__tubuser
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • TubentertainVersion
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tubentertain/tubentertain.php

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 87% 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
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
  • Tags: There are too many tags (92 tag instead of maximum 10)
You can take inspiration from this readme.txt

tubentertain/tubentertain.php 85% from 13 tests

This is the main PHP file of "TubEntertain" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 312 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected7,472 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS574445,209
PHP12,0423191,626
SVG100565
JavaScript141072

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity29.50
▷ Minimum class complexity6.00
▷ Maximum class complexity53.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1041.67%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.46MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/border.png0.07KB0.10KB0.00%
css/images/YouTube-icon.png1.58KB1.49KB▼ 5.99%
css/images/tv.png29.26KB1.31KB▼ 95.52%
css/images/inError.png303.32KB52.63KB▼ 82.65%
css/images/overlay.png0.11KB0.15KB0.00%