10% simple-ticker

Code Review | Simple Ticker

WordPress plugin Simple Ticker scored10%from 54 tests.

About plugin

  • Plugin page: simple-ticker
  • Plugin version: 3.07
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Jul 31, 2016
  • Latest release: Nov 2, 2023
  • Number of updates: 80
  • Update frequency: every 33.1 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /7,415 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/simple-ticker/lib/class-simpleticker.php+55
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.43ms] Passed 4 tests

A check of server-side resources used by Simple Ticker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0436.48 ▼16.27
Dashboard /wp-admin3.34 ▲0.0446.34 ▼7.18
Posts /wp-admin/edit.php3.39 ▲0.0349.09 ▲3.22
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.34 ▲6.48
Media Library /wp-admin/upload.php3.26 ▲0.0334.69 ▼1.50
Simple Ticker /wp-admin/options-general.php?page=SimpleTicker3.2337.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
simple_ticker
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_simpletickerwidgetitem
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Ticker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8214.24 ▼0.031.86 ▲0.2336.71 ▼5.90
Dashboard /wp-admin2,207 ▲265.64 ▲0.0695.75 ▼24.5941.95 ▼1.62
Posts /wp-admin/edit.php2,109 ▲92.03 ▲0.0238.25 ▼0.2736.43 ▼0.41
Add New Post /wp-admin/post-new.php6,201 ▲4,67518.88 ▼4.31844.97 ▲143.7260.70 ▲2.28
Media Library /wp-admin/upload.php1,412 ▲124.19 ▲0.0197.09 ▼13.9742.42 ▼4.39
Simple Ticker /wp-admin/options-general.php?page=SimpleTicker1,8903.2382.6525.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_simpletickerwidgetitem
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 | 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 fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-ticker/lib/class-simpletickeradmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-ticker/lib/class-simpletickeradmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-ticker/lib/class-simpleticker.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-ticker/lib/class-simpletickerwidgetitem.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: woocommerce, ticker, widget, shortcode, block

simple-ticker/simpleticker.php 92% from 13 tests

Analyzing the main PHP file in "Simple Ticker" version 3.07
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-ticker.php" instead of "simpleticker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,157 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP6114251937
JavaScript31117175
CSS10025
JSON10020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity35.33
▷ Minimum class complexity3.00
▷ Maximum class complexity58.00
Average method complexity5.90
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1885.71%
▷ Protected methods00.00%
▷ Private methods314.29%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin