78% liveblog

Code Review | Liveblog

WordPress plugin Liveblog scored 78% from 54 tests.

About plugin

  • Plugin page: liveblog
  • Plugin version: 1.9.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2012
  • Latest release: Sep 29, 2021
  • Number of updates: 49
  • Update frequency: every 67.8 days
  • Top authors: philipjohn (55.1%)nbachiyski (26.53%)batmoo (20.41%)automattic (4.08%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active / 81,836 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.23MB] [CPU: ▲2.41ms] Passed 4 tests

This is a short check of server-side resources used by Liveblog
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.70 ▲1.2445.91 ▲6.21
Dashboard /wp-admin4.52 ▲1.2248.00 ▼2.14
Posts /wp-admin/edit.php4.64 ▲1.2853.37 ▲2.68
Add New Post /wp-admin/post-new.php7.14 ▲1.2690.59 ▲2.87
Media Library /wp-admin/upload.php4.44 ▲1.2143.73 ▲9.25
Hashtags /wp-admin/edit-tags.php?taxonomy=hashtags4.4336.34

Server storage [IO: ▲30.78MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Total filesystem usage should be limited to 25MB (currently using 30.78MB)
Filesystem: 176 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
liveblog_rewrites_version
widget_theysaidso_widget
widget_liveblog-key-events-widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Liveblog
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.59 ▼0.711.83 ▲0.1842.90 ▼6.28
Dashboard /wp-admin2,213 ▲285.90 ▲0.95106.28 ▼12.7441.33 ▼1.68
Posts /wp-admin/edit.php2,157 ▲682.02 ▼0.0337.31 ▼5.4535.28 ▼1.93
Add New Post /wp-admin/post-new.php6,531 ▲4,99520.24 ▼3.00879.89 ▲201.1158.43 ▲5.78
Media Library /wp-admin/upload.php1,395 ▲44.18 ▼0.0693.68 ▼4.5941.78 ▼3.93
Hashtags /wp-admin/edit-tags.php?taxonomy=hashtags1,2412.1325.8828.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • liveblog_rewrites_version
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_liveblog-key-events-widget
    • widget_recent-posts

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/liveblog/templates/restrict-manage-posts.php
  • 29× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Embed' not found in wp-content/plugins/liveblog/classes/class-wpcom-liveblog-entry-embed.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/liveblog/templates/amp/author.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WPCOM_Liveblog_Lazyloader' not found in wp-content/plugins/liveblog/templates/liveblog-loop.php:18
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/liveblog/templates/liveblog-key-events.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/liveblog/templates/liveblog-key-single-list.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/liveblog/templates/old-wp-notice.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/liveblog/templates/lazyload-notice.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/liveblog/templates/liveblog-form.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/liveblog/templates/liveblog-key-single-timeline.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/liveblog/templates/amp/feed.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
1 plugin tags: liveblog

liveblog/liveblog.php Passed 13 tests

Analyzing the main PHP file in "Liveblog" version 1.9.6
106 characters long description:
Empowers website owners to provide rich and engaging live event coverage to a large, distributed audience.

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
Good job! No executable or dangerous file extensions detected24,722 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
JSON10013,322
PHP371,1052,3794,710
JavaScript776453794,301
Sass3021781,297
PO File8357395957
CSS4269135

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.62
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes15.00%
Methods287
▷ Static methods19768.64%
▷ Public methods24685.71%
▷ Protected methods00.00%
▷ Private methods4114.29%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants32
▷ Global constants00.00%
▷ Class constants32100.00%
▷ Public constants32100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 7.86MB with 6.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/LazyLoad.png1,638.64KB315.38KB▼ 80.75%
docs/CRUD.png2,792.14KB457.17KB▼ 83.63%
docs/Preview.png557.84KB109.94KB▼ 80.29%
docs/EntriesBetweenTimestamps.png1,519.19KB291.71KB▼ 80.80%
docs/SingleEntry.png1,540.04KB301.74KB▼ 80.41%