83% live-news-lite

Code Review | Live News

WordPress plugin Live News scored83%from 54 tests.

About plugin

  • Plugin page: live-news-lite
  • Plugin version: 1.07
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: May 6, 2021
  • Latest release: Oct 24, 2023
  • Number of updates: 6
  • Update frequency: every 150.3 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /4,692 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▲0.98ms] Passed 4 tests

Analyzing server-side resources used by Live News
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1045.83 ▲9.10
Dashboard /wp-admin3.57 ▲0.2643.85 ▼0.96
Posts /wp-admin/edit.php3.69 ▲0.3245.79 ▲0.86
Add New Post /wp-admin/post-new.php6.15 ▲0.2684.57 ▼0.65
Media Library /wp-admin/upload.php3.50 ▲0.2636.79 ▲4.66
Sliding News /wp-admin/admin.php?page=daextlnl-sliding3.8138.19
Featured News /wp-admin/admin.php?page=daextlnl-featured3.7235.85
Export to Pro /wp-admin/admin.php?page=daextlnl-export-to-pro3.4630.59
News Tickers /wp-admin/admin.php?page=daextlnl-tickers4.5239.52
Pro Version /wp-admin/admin.php?page=daextlnl-pro-version3.4730.96
Help /wp-admin/admin.php?page=daextlnl-help3.4631.03
Options /wp-admin/admin.php?page=daextlnl-options3.4730.46

Server storage [IO: ▲0.74MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 62 new files
Database: 3 new tables, 11 new options
New tables
wp_daextlnl_sliding_news
wp_daextlnl_featured_news
wp_daextlnl_tickers
New WordPress options
daextlnl_database_version
daextlnl_detect_url_mode
theysaidso_admin_options
daextlnl_featured_menu_capability
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
daextlnl_tickers_menu_capability
daextlnl_sliding_menu_capability
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Live News
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲13314.57 ▲0.3528.88 ▲27.1639.01 ▼4.48
Dashboard /wp-admin2,232 ▲625.55 ▼0.0684.39 ▼12.2734.82 ▼5.31
Posts /wp-admin/edit.php2,143 ▲432.08 ▲0.1235.58 ▲1.2428.62 ▼10.36
Add New Post /wp-admin/post-new.php1,558 ▲2723.50 ▲0.35624.53 ▼34.4452.02 ▼7.76
Media Library /wp-admin/upload.php1,443 ▲464.25 ▲0.0794.99 ▼4.2137.68 ▼5.72
Sliding News /wp-admin/admin.php?page=daextlnl-sliding1,0553.4239.5625.99
Featured News /wp-admin/admin.php?page=daextlnl-featured8721.8026.0423.28
Export to Pro /wp-admin/admin.php?page=daextlnl-export-to-pro8442.0123.4728.13
News Tickers /wp-admin/admin.php?page=daextlnl-tickers3,2614.81110.6178.35
Pro Version /wp-admin/admin.php?page=daextlnl-pro-version8762.0223.7729.17
Help /wp-admin/admin.php?page=daextlnl-help8612.1523.8827.14
Options /wp-admin/admin.php?page=daextlnl-options9542.0031.5931.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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)
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/live-news-lite/admin/view/featured.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/live-news-lite/admin/view/help.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/live-news-lite/admin/view/tickers.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/live-news-lite/admin/view/options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/live-news-lite/admin/view/sliding.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/live-news-lite/admin/view/export_to_pro.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/live-news-lite/admin/view/pro_version.php:8

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

live-news-lite/init.php 85% from 13 tests

The main file in "Live News" v. 1.07 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 187 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("live-news-lite.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected11,926 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript151,1638456,669
PHP141,0617423,763
CSS12222611,475
Markdown14019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity25.00
▷ Minimum class complexity13.00
▷ Maximum class complexity34.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods70
▷ Static methods710.00%
▷ Public methods6288.57%
▷ Protected methods00.00%
▷ Private methods811.43%
Functions1
▷ Named functions1100.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
17 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/close-button.png0.25KB0.35KB0.00%
admin/assets/img/update.png15.47KB0.51KB▼ 96.70%
admin/assets/img/help-f7f7f7.png15.86KB0.59KB▼ 96.25%
admin/assets/img/trash.png1.11KB0.19KB▼ 82.81%
admin/assets/img/edit-hover.png1.30KB0.33KB▼ 74.47%