82% news-ticker-tj

Code Review | News ticker

WordPress plugin News ticker scored 82% from 53 tests.

About plugin

  • Plugin page: news-ticker-tj
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 5.8.1
  • First release: Sep 16, 2016
  • Latest release: Oct 23, 2018
  • Number of updates: 81
  • Update frequency: every 9.5 days
  • Top authors: Tajul2010 (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

200+ active / 11,358 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.28MB] [CPU: ▼275.91ms] Passed 4 tests

An overview of server-side resources used by News ticker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.81 ▲0.0931.47 ▲10.26
Dashboard /wp-admin3.12 ▲0.0742.42 ▼7.17
Posts /wp-admin/edit.php3.17 ▲0.0742.54 ▼1.56
Add New Post /wp-admin/post-new.php4.10 ▼1.3341.82 ▼1,086.19
Media Library /wp-admin/upload.php3.06 ▲0.0630.34 ▼8.71
Add New News /wp-admin/post-new.php?post_type=comet_news3.0032.32
News Options /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug3.0129.23
News /wp-admin/edit.php?post_type=comet_news3.1034.12

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for News ticker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,839 ▲23316.40 ▲0.8011.25 ▲1.1846.49 ▲1.87
Dashboard /wp-admin2,973 ▲1205.88 ▲0.01138.99 ▲4.73111.45 ▲2.60
Posts /wp-admin/edit.php2,746 ▲402.70 ▲0.0264.02 ▼3.1288.57 ▼8.00
Add New Post /wp-admin/post-new.php1,679 ▼35918.82 ▼0.40365.56 ▼17.96105.52 ▼2.24
Media Library /wp-admin/upload.php1,815 ▲435.02 ▼0.01139.06 ▼17.17114.60 ▼11.48
Add New News /wp-admin/post-new.php?post_type=comet_news1,9923.30105.9978.97
News Options /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug1,0682.0956.1574.73
News /wp-admin/edit.php?post_type=comet_news1,4002.6162.0868.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=comet_news
    • > Notice in wp-content/plugins/news-ticker-tj/news-ticker-tj.php+228
    Undefined index: news_cat
    • > GET request to /wp-admin/post-new.php?post_type=comet_news
    • > Notice in wp-content/plugins/news-ticker-tj/news-ticker-tj.php+229
    Undefined index: news_content
    • > GET request to /wp-admin/post-new.php?post_type=comet_news
    • > Notice in wp-content/plugins/news-ticker-tj/news-ticker-tj.php+230
    Undefined index: news_link
    • > GET request to /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug
    • > Notice in wp-content/plugins/news-ticker-tj/news-ticker-tj.php+113
    Undefined index: breaking_news_text
    • > GET request to /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug
    • > Notice in wp-content/plugins/news-ticker-tj/news-ticker-tj.php+125
    Undefined index: breaking_news_text_color
    • > GET request to /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug
    • > Notice in wp-content/plugins/news-ticker-tj/news-ticker-tj.php+137
    Undefined index: breaking_news_text_bg_color

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/news-ticker-tj/news-ticker-tj.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug
    • > Rendering (warning) in unknown
    /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug 155 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug
    • > Rendering (warning) in unknown
    /wp-admin/edit.php?post_type=comet_news&page=breaking_news_slug 159 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #2 (add News) image required
You can take inspiration from this readme.txt

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

"News ticker" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected462 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25014235
PHP214881192
CSS1174735

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.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 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/bn-arrows.png1.42KB0.60KB▼ 57.85%