83% breaking-news-ticker

Code Review | Breaking News Ticker

WordPress plugin Breaking News Ticker scored83%from 54 tests.

About plugin

  • Plugin page: breaking-news-ticker
  • Plugin version: 2.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.4.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Feb 25, 2016
  • Number of updates: 76
  • Update frequency: every 1.9 days
  • Top authors: amityTheme (88.16%)wpqastle (13.16%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active /31,992 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.01MB] [CPU: ▼4.35ms] Passed 4 tests

A check of server-side resources used by Breaking News Ticker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.07 ▼0.35
Dashboard /wp-admin3.48 ▲0.1854.41 ▲1.53
Posts /wp-admin/edit.php3.54 ▲0.1851.03 ▲1.21
Add New Post /wp-admin/post-new.php5.54 ▼0.3478.51 ▼19.07
Media Library /wp-admin/upload.php3.30 ▲0.0736.97 ▲0.83

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_bnt_widget
bnt_basics
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
bnt_styles
widget_theysaidso_widget
bnt_ticker

Browser metrics Passed 4 tests

Checking browser requirements for Breaking News Ticker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,478 ▲71715.20 ▲0.855.74 ▲3.9541.49 ▼1.50
Dashboard /wp-admin2,785 ▲6116.36 ▲0.78118.64 ▲13.8840.95 ▼3.59
Posts /wp-admin/edit.php2,719 ▲6223.51 ▲1.5050.97 ▲14.2932.62 ▼5.82
Add New Post /wp-admin/post-new.php2,132 ▲60622.36 ▼0.66567.74 ▼65.4634.41 ▼9.47
Media Library /wp-admin/upload.php1,853 ▲4504.28 ▲0.0485.29 ▼18.0545.05 ▼1.12

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/breaking-news-ticker/inc/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/breaking-news-ticker/inc/functions.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bnt_get_option() in wp-content/plugins/breaking-news-ticker/inc/style-css.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AmityThemes_Settings_API' not found in wp-content/plugins/breaking-news-ticker/admin/amity-settings-api.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #0, #0 in breaking-news-ticker/assets to your readme.txt
  • Tags: There are too many tags (21 tag instead of maximum 10)
You can look at the official readme.txt

breaking-news-ticker/breaking-news-ticker.php 92% from 13 tests

The main PHP script in "Breaking News Ticker" version 2.4.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected2,244 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP104113871,443
CSS39014432
JavaScript36849225
PO File16264144

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity25.20
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods4195.35%
▷ Protected methods00.00%
▷ Private methods24.65%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/up.png1.15KB0.49KB▼ 57.85%
assets/images/controls.png2.08KB1.38KB▼ 33.36%
assets/images/down.png1.17KB0.48KB▼ 58.92%