10% simple-news-ticker

Code Review | Simple News Ticker

WordPress plugin Simple News Ticker scored10%from 54 tests.

About plugin

  • Plugin page: simple-news-ticker
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Nov 3, 2015
  • Number of updates: 18
  • Update frequency: every 0.7 days
  • Top authors: mimothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,262 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/simple-news-ticker/simple-news-ticker.php+302
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼55.89ms] Passed 4 tests

An overview of server-side resources used by Simple News Ticker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.64 ▼37.02
Dashboard /wp-admin2.10 ▼1.216.11 ▼47.52
Posts /wp-admin/edit.php2.10 ▼1.266.53 ▼41.09
Add New Post /wp-admin/post-new.php2.10 ▼3.796.31 ▼97.93
Media Library /wp-admin/upload.php2.10 ▼1.135.08 ▼29.52

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_simple_news_ticker
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Simple News Ticker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.63 ▼0.768.37 ▲6.6343.04 ▲0.70
Dashboard /wp-admin2,206 ▲184.84 ▼1.04105.65 ▼7.1644.02 ▼3.38
Posts /wp-admin/edit.php2,092 ▲62.03 ▲0.0134.75 ▼2.7031.14 ▼1.85
Add New Post /wp-admin/post-new.php1,514 ▼2817.51 ▼0.83648.78 ▼7.5452.19 ▼4.71
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.0093.58 ▼10.1240.95 ▼2.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-news-ticker/simple-news-ticker.php+302
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_simple_news_ticker
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/simple-news-ticker/views/widget.php:6
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/simple-news-ticker/views/widget.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-news-ticker/views/admin.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: jquery, news, widget, ticker

simple-news-ticker/simple-news-ticker.php Passed 13 tests

The primary PHP file in "Simple News Ticker" version 1.0.2 is used by WordPress to initiate all plugin functionality
69 characters long description:
Create a ticker of posts, pages or whatever Custom Post Type you have

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin770 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2195492
PHP312795182
CSS1181057
PO File1111139

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.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 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin