84% text-scrolling-widget

Code Review | Text Scroll Widget

WordPress plugin Text Scroll Widget scored84%from 54 tests.

About plugin

  • Plugin page: text-scrolling-wi...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Mar 11, 2017
  • Latest release: Mar 16, 2022
  • Number of updates: 11
  • Update frequency: every 165.9 days
  • Top authors: jiteshgondaliya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /12,018 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.75ms] Passed 4 tests

This is a short check of server-side resources used by Text Scroll Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.48 ▼1.38
Dashboard /wp-admin3.34 ▼0.0146.30 ▼10.94
Posts /wp-admin/edit.php3.39 ▲0.0348.05 ▼0.33
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.23 ▼11.59
Media Library /wp-admin/upload.php3.26 ▲0.0333.34 ▼3.09

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_textscrolling
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
textscrolling_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Text Scroll Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9714.46 ▲0.011.65 ▼0.4037.77 ▼2.87
Dashboard /wp-admin2,222 ▲375.90 ▲0.01109.10 ▲7.5438.24 ▼2.84
Posts /wp-admin/edit.php2,102 ▲132.01 ▲0.0139.96 ▼1.6835.97 ▲0.10
Add New Post /wp-admin/post-new.php1,546 ▲2723.26 ▲0.06681.90 ▲3.0263.36 ▲3.54
Media Library /wp-admin/upload.php1,404 ▲164.22 ▼0.0192.47 ▼13.1842.97 ▼2.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • textscrolling_db_version
    • widget_textscrolling
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/text-scrolling-widget/includes/TextScrollingFrontEnd.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/text-scrolling-widget/includes/templates/text-scrolling-front-end.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/text-scrolling-widget/includes/TextScrollingAdmin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/text-scrolling-widget/includes/templates/text-scrolling-setting.php:6

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === text-scrolling-widget === )
You can take inspiration from this readme.txt

text-scrolling-widget/TextScrollWidget.php 92% from 13 tests

The main PHP script in "Text Scroll Widget" version 2.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("text-scrolling-widget.php" instead of "TextScrollWidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected174 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54620164
JavaScript112110

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin