83% rhx-news-ticker

Code Review | Rhx News Ticker

WordPress plugin Rhx News Ticker scored83%from 54 tests.

About plugin

  • Plugin page: rhx-news-ticker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 6, 2022
  • Latest release: Mar 6, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: xihad1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Rhx News Ticker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.37 ▲0.19
Dashboard /wp-admin3.32 ▲0.0251.34 ▲3.23
Posts /wp-admin/edit.php3.43 ▲0.0846.10 ▼1.62
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.88 ▼14.57
Media Library /wp-admin/upload.php3.24 ▲0.0232.98 ▼0.39

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
rhxn_ticker_version
widget_recent-posts
widget_theysaidso_widget
rhxn_ticker_installed
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Rhx News Ticker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.25 ▼1.432.12 ▲0.3047.27 ▲2.33
Dashboard /wp-admin2,222 ▲314.86 ▼0.24107.88 ▲4.7041.66 ▼0.09
Posts /wp-admin/edit.php2,105 ▲192.02 ▲0.0138.92 ▲2.7034.21 ▲0.40
Add New Post /wp-admin/post-new.php1,549 ▲3523.33 ▲5.85657.06 ▼37.4453.83 ▼0.06
Media Library /wp-admin/upload.php1,407 ▲194.20 ▲0.0399.00 ▼4.0644.02 ▼1.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • rhxn_ticker_version
    • widget_recent-posts
    • rhxn_ticker_installed
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rhx-news-ticker/includes/frontend-control.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rhx-news-ticker/includes/dynamic-style.php:79

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Ticker Settings), #2 (Back End), #3 (Front End)
The official readme.txt might help

rhx-news-ticker/rhx-news-ticker.php 85% from 13 tests

The principal PHP file in "Rhx News Ticker" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 217 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin1,088 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP192195151,001
CSS20055
JSON20024
JavaScript25118

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.75
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods59
▷ Static methods1932.20%
▷ Public methods5694.92%
▷ Protected methods00.00%
▷ Private methods35.08%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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
There were not PNG files found in your plugin