84% jb-news-ticker

Code Review | JB News Ticker

WordPress plugin JB News Ticker scored84%from 54 tests.

About plugin

  • Plugin page: jb-news-ticker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: May 14, 2015
  • Latest release: May 14, 2015
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: jobair (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,834 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.15ms] Passed 4 tests

An overview of server-side resources used by JB News Ticker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.74 ▼4.99
Dashboard /wp-admin3.31 ▼0.0343.29 ▼19.92
Posts /wp-admin/edit.php3.36 ▲0.0148.92 ▲2.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.30 ▼16.27
Media Library /wp-admin/upload.php3.24 ▲0.0133.03 ▼3.42

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for JB News Ticker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13413.92 ▼0.617.59 ▲6.1139.60 ▲2.02
Dashboard /wp-admin2,199 ▲195.64 ▼0.0197.97 ▲7.5543.87 ▲1.08
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0440.28 ▲5.0037.33 ▼0.36
Add New Post /wp-admin/post-new.php1,539 ▲1023.09 ▼0.15673.56 ▲70.6350.15 ▼2.81
Media Library /wp-admin/upload.php1,398 ▲14.17 ▲0.0097.42 ▼3.4141.21 ▼2.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jb-news-ticker/jb-plugin-hook.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

jb-news-ticker/jb-plugin-hook.php 92% from 13 tests

The primary PHP file in "JB News Ticker" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("jb-news-ticker.php" instead of "jb-plugin-hook.php")

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
No dangerous file extensions were detected551 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1419503
PHP181047
JavaScript1051

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin