84% lezwatchtv

Code Review | LezWatch.TV News and Information

WordPress plugin LezWatch.TV News and Information scored 84% from 54 tests.

About plugin

  • Plugin page: lezwatchtv
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7
  • WordPress version: 5.8.1
  • First release: Sep 13, 2018
  • Latest release: May 11, 2021
  • Number of updates: 11
  • Update frequency: every 88.3 days
  • Top authors: Ipstenu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,361 total downloads

Benchmarks

Plugin footprint 83% 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.06MB] [CPU: ▼150.43ms] Passed 4 tests

Analyzing server-side resources used by LezWatch.TV News and Information
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0633.68 ▼0.70
Dashboard /wp-admin3.11 ▲0.0537.42 ▼8.41
Posts /wp-admin/edit.php3.22 ▲0.1143.34 ▲2.16
Add New Post /wp-admin/post-new.php5.01 ▼0.4261.30 ▼594.76
Media Library /wp-admin/upload.php3.05 ▲0.0535.60 ▲7.26

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 5 new options
New WordPress options
widget_byq-dead-char
widget_lwtv-of-the-day
widget_byq-in-this-year
widget_byq-statistics
widget_byq-on-this-day

Browser metrics Passed 4 tests

LezWatch.TV News and Information: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,691 ▲11915.76 ▲0.148.13 ▼0.7450.05 ▼0.18
Dashboard /wp-admin2,973 ▲395.91 ▼0.14146.17 ▼8.68106.99 ▲0.86
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0066.24 ▼1.0886.89 ▼2.17
Add New Post /wp-admin/post-new.php1,689 ▲618.73 ▼0.07390.00 ▼25.81104.80 ▼1.79
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.04168.16 ▼0.69115.18 ▼7.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 5 options
    • widget_lwtv-of-the-day
    • widget_byq-in-this-year
    • widget_byq-statistics
    • widget_byq-on-this-day
    • widget_byq-dead-char

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lezwatchtv/widgets/of-the-day.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lezwatchtv/widgets/last-death.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lezwatchtv/widgets/statistics.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lezwatchtv/widgets/this-year.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lezwatchtv/widgets/last-death.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lezwatchtv/lezwatchtv-main.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lezwatchtv/widgets/on-this-day.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: television, queer, lesbian, block, tv

lezwatchtv/lezwatchtv-main.php 92% from 13 tests

This is the main PHP file of "LezWatch.TV News and Information" version 1.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lezwatchtv.php" instead of "lezwatchtv-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin9,233 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JSON3007,278
CSS343531,224
PHP10171310599
JavaScript5164593
Sass42131
XML1008

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.14
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods513.89%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/css/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%