84% livestream-notice

Code Review | Livestream Notice

WordPress plugin Livestream Notice scored84%from 54 tests.

About plugin

  • Plugin page: livestream-notice
  • Plugin version: 1.3.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 21, 2018
  • Latest release: Aug 9, 2023
  • Number of updates: 13
  • Update frequency: every 137.1 days
  • Top authors: mrdemonwolf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /741 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.01MB] [CPU: ▼1.80ms] Passed 4 tests

An overview of server-side resources used by Livestream Notice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.08 ▲1.80
Dashboard /wp-admin3.32 ▲0.0173.20 ▲16.96
Posts /wp-admin/edit.php3.37 ▲0.0151.18 ▼3.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.96 ▼8.30
Media Library /wp-admin/upload.php3.24 ▲0.0138.51 ▲2.66
Livestream Notice /wp-admin/options-general.php?page=livestreamNotice3.2535.51

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Livestream Notice
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12013.42 ▼0.5413.95 ▲12.2341.60 ▼4.52
Dashboard /wp-admin2,202 ▲375.62 ▲0.0594.74 ▲2.1142.21 ▼5.63
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0040.79 ▲1.8834.86 ▼2.68
Add New Post /wp-admin/post-new.php1,534 ▲822.89 ▼0.16672.32 ▼7.8461.63 ▲8.94
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.09109.42 ▲8.1950.50 ▲3.70
Livestream Notice /wp-admin/options-general.php?page=livestreamNotice8702.1225.6428.88

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/livestream-notice/livestream-notice.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/livestream-notice/pages/settings.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

livestream-notice/livestream-notice.php 92% from 13 tests

This is the main PHP file of "Livestream Notice" version 1.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin490 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1418220
JavaScript11018112
PHP22421110
Markdown131048

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin