68% ditty-news-ticker

Code Review | Ditty – Responsive News Tickers, Sliders, and Lists

WordPress plugin Ditty – Responsive News Tickers, Sliders, and Lists scored68%from 54 tests.

About plugin

  • Plugin page: ditty-news-ticker
  • Plugin version: 3.1.29
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 24, 2013
  • Latest release: Oct 3, 2023
  • Number of updates: 417
  • Update frequency: every 9.4 days
  • Top authors: metaphorcreations (100%)

Code review

54 tests

User reviews

94 reviews

Install metrics

40,000+ active /2,102,150 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.42MB] [CPU: ▲2.41ms] Passed 4 tests

This is a short check of server-side resources used by Ditty – Responsive News Tickers, Sliders, and Lists
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3745.49 ▲2.79
Dashboard /wp-admin3.74 ▲0.4355.13 ▲2.80
Posts /wp-admin/edit.php3.79 ▲0.4451.37 ▲0.85
Add New Post /wp-admin/post-new.php6.53 ▲0.65107.84 ▲3.18
Media Library /wp-admin/upload.php3.65 ▲0.4242.31 ▲6.17

Server storage [IO: ▲55.67MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Filesystem usage must be lower than 25MB (currently using 55.67MB)
Filesystem: 654 new files
Database: 2 new tables, 12 new options
New tables
wp_ditty_items
wp_ditty_itemmeta
New WordPress options
widget_ditty-widget
widget_theysaidso_widget
can_compress_scripts
ditty_plugin_version
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
wp_ditty_itemmeta_db_version
wp_ditty_items_db_version
...

Browser metrics Passed 4 tests

Ditty – Responsive News Tickers, Sliders, and Lists: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲10614.36 ▲0.161.62 ▼0.3841.24 ▼3.81
Dashboard /wp-admin2,286 ▲1095.50 ▼0.1693.61 ▲3.3441.23 ▼0.68
Posts /wp-admin/edit.php2,190 ▲902.02 ▲0.0335.80 ▼0.7334.92 ▲0.11
Add New Post /wp-admin/post-new.php6,432 ▲4,89527.59 ▲9.50879.75 ▲209.4865.57 ▲1.34
Media Library /wp-admin/upload.php1,490 ▲904.17 ▲0.0497.11 ▼13.7944.48 ▼6.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_ditty_itemmeta
    • wp_ditty_items
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • db_upgraded
    • widget_recent-comments
    • wp_ditty_items_db_version
    • widget_ditty-widget
    • wp_ditty_itemmeta_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ditty_licenses
    • widget_recent-posts
    • ditty_plugin_version_upgraded_from
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ditty-news-ticker/legacy/inc/templates/play_pause.php
  • 249× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ditty-news-ticker/legacy/inc/settings.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/ditty-news-ticker/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ditty_Field' not found in wp-content/plugins/ditty-news-ticker/includes/fields/ditty-field-file.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/ditty-news-ticker/vendor/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Ditty_Item_Type_Default' not found in wp-content/plugins/ditty-news-ticker/includes/class-ditty-item-type-wp-editor.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/ditty-news-ticker/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/ditty-news-ticker/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ditty-news-ticker/includes/layout-tag-hooks-posts.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/ditty-news-ticker/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/ditty-news-ticker/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: content slider, news ticker, responsive slider, post ticker, post slider

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

This is the main PHP file of "Ditty – Responsive News Tickers, Sliders, and Lists" version 3.1.29, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
110 characters long description:
Ditty offers a range of content display options, including its signature news ticker and customizable layouts.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected95,670 lines of code in 592 files:
LanguageFilesBlank linesComment linesLines of code
CSS5716,28441238,499
PHP3958,20215,03837,770
JavaScript462,1422,2259,693
PO File71,5293,0123,746
Sass483061,3022,107
Markdown938201,306
HTML29201,165
JSON1100920
YAML6367182
XML350117
SVG41192
make16153
Dockerfile24019
INI1001

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,493)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity15.91
▷ Minimum class complexity1.00
▷ Maximum class complexity1,493.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces42
Interfaces13
Traits0
Classes313
▷ Abstract classes134.15%
▷ Concrete classes30095.85%
▷ Final classes4615.33%
Methods1,731
▷ Static methods1126.47%
▷ Public methods1,19569.04%
▷ Protected methods36421.03%
▷ Private methods1729.94%
Functions458
▷ Named functions35978.38%
▷ Anonymous functions9921.62%
Constants112
▷ Global constants43.57%
▷ Class constants10896.43%
▷ Public constants108100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/libs/jquery-minicolors/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
includes/img/ditty-logo-black.png10.57KB7.28KB▼ 31.14%