84% horizontal-scrolling-announcements

Code Review | Horizontal scrolling announcements

WordPress plugin Horizontal scrolling announcements scored84%from 54 tests.

About plugin

  • Plugin page: horizontal-scroll...
  • Plugin version: 2.5
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 10, 2018
  • Latest release: Oct 1, 2023
  • Number of updates: 22
  • Update frequency: every 95.0 days
  • Top authors: gopiplus (100%)Otto42 (9.09%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10,000+ active /87,419 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲1.42ms] Passed 4 tests

An overview of server-side resources used by Horizontal scrolling announcements
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.50 ▲5.46
Dashboard /wp-admin3.42 ▲0.1247.02 ▼1.22
Posts /wp-admin/edit.php3.53 ▲0.1847.71 ▲1.09
Add New Post /wp-admin/post-new.php6.00 ▲0.1196.28 ▲3.35
Media Library /wp-admin/upload.php3.34 ▲0.1136.23 ▲2.44

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: 1 new table, 9 new options
New tables
wp_horizontal_scrolling_hsas
New WordPress options
widget_recent-posts
widget_horizontal-scrolling-announcements
horizontal-scrolling-announcements
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
horizontal-scrolling-roles

Browser metrics Passed 4 tests

This is an overview of browser requirements for Horizontal scrolling announcements
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.42 ▼1.157.47 ▲5.5439.95 ▼3.88
Dashboard /wp-admin2,207 ▲305.57 ▼0.0986.73 ▼7.8337.48 ▼7.39
Posts /wp-admin/edit.php2,112 ▲122.01 ▲0.0433.47 ▼2.0735.14 ▼0.70
Add New Post /wp-admin/post-new.php1,545 ▲1718.06 ▼5.14594.65 ▼36.1975.44 ▲22.17
Media Library /wp-admin/upload.php1,415 ▲184.17 ▼0.0294.28 ▼1.5842.62 ▼2.42

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_horizontal-scrolling-announcements
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/horizontal-scrolling-announcements/content/content-add.php
    • > /wp-content/plugins/horizontal-scrolling-announcements/horizontal-scrolling-announcements.php
    • > /wp-content/plugins/horizontal-scrolling-announcements/content/content-edit.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: scrolling, announcements

horizontal-scrolling-announcements/horizontal-scrolling-announcements.php 92% from 13 tests

Analyzing the main PHP file in "Horizontal scrolling announcements" version 2.5
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,920 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10198651,213
JavaScript35596403
PO File2140176304

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.86
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods2281.48%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin