10% bknewsticker

Code Review | Bknewsticker

WordPress plugin Bknewsticker scored10%from 54 tests.

About plugin

  • Plugin page: bknewsticker
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 6.3.1
  • First release: May 9, 2014
  • Latest release: Sep 16, 2014
  • Number of updates: 41
  • Update frequency: every 3.2 days
  • Top authors: beke_ro (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active /11,800 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/bknewsticker/ticker.php+432
    Use of undefined constant News - assumed 'News' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.17MB] [CPU: ▼6.45ms] Passed 4 tests

Server-side resources used by Bknewsticker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2039.43 ▲2.61
Dashboard /wp-admin3.48 ▲0.1350.36 ▼6.37
Posts /wp-admin/edit.php3.59 ▲0.2448.35 ▼0.60
Add New Post /wp-admin/post-new.php6.08 ▲0.1980.42 ▼18.78
Media Library /wp-admin/upload.php3.40 ▲0.1735.82 ▼0.04
BkNewsticker /wp-admin/options-general.php?page=tickeroptions3.3836.96

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 48 new files
Database: no new tables, 30 new options
New WordPress options
ticker_user_specified_posts
ticker_rss
ticker_auto_excerpt_length
ticker_color_link
ticker_type
tiker_content_title
ticker_admin_messages_to_show_once
ticker_color_title
ticker_popular_days
border_size_ticker
...

Browser metrics Passed 4 tests

An overview of browser requirements for Bknewsticker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16413.93 ▼0.4312.36 ▲10.8242.45 ▲1.69
Dashboard /wp-admin2,215 ▲475.82 ▲0.1798.53 ▲13.4242.75 ▼2.91
Posts /wp-admin/edit.php2,104 ▲12.29 ▲0.2733.82 ▼10.9131.30 ▼3.63
Add New Post /wp-admin/post-new.php1,547 ▲1923.31 ▲0.07637.74 ▼30.9035.34 ▼18.21
Media Library /wp-admin/upload.php1,424 ▲214.40 ▲0.1793.69 ▼19.7646.38 ▼3.30
BkNewsticker /wp-admin/options-general.php?page=tickeroptions1,9612.5382.4066.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 30 options in the database
    • ticker_timeout
    • db_upgraded
    • ext_rss_num
    • ticker_num_posts
    • widget_theysaidso_widget
    • bke_textall_size
    • ticker_speed
    • ticker_dates
    • ticker_anim
    • ticker_color_excerpt
    • ...

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 | 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bknewsticker/ticker-color.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bknewsticker/ticker.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Some examples.), #2 (The Setup Page.)
The official readme.txt might help

bknewsticker/ticker.php 92% from 13 tests

The principal PHP file in "Bknewsticker" v. 1.0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bknewsticker.php" instead of "ticker.php")

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 detected6,208 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
CSS35121,385
JavaScript21231211,302
Sass131922928
LESS121827907
PHP34320871
SVG100414
PO File3184369401

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.28MB with 0.20MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png112.71KB39.69KB▼ 64.79%
screenshot-1.png177.57KB47.06KB▼ 73.50%