67% floating-news-headline

Code Review | Floating News Headline - Scrolling Text

WordPress plugin Floating News Headline - Scrolling Text scored 67% from 54 tests.

About plugin

  • Plugin page: floating-news-hea...
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2017
  • Latest release: May 18, 2023
  • Number of updates: 54
  • Update frequency: every 42.5 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 15,559 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.48MB] [CPU: ▲0.01ms] Passed 4 tests

This is a short check of server-side resources used by Floating News Headline - Scrolling Text
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5040.94 ▲1.90
Dashboard /wp-admin3.82 ▲0.5252.51 ▼3.77
Posts /wp-admin/edit.php3.87 ▲0.5252.34 ▲5.79
Add New Post /wp-admin/post-new.php6.34 ▲0.4686.29 ▼2.97
Media Library /wp-admin/upload.php3.68 ▲0.4538.93 ▲4.87
Docs /wp-admin/edit.php?post_type=floating_headline&page=ak-doc-page3.6534.44
Add Floating Headline /wp-admin/post-new.php?post_type=floating_headline3.8549.45
Our Theme /wp-admin/edit.php?post_type=floating_headline&page=sr-theme-page3.6534.61
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.7536.35
All Floating Headline /wp-admin/edit.php?post_type=floating_headline3.6834.11

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Floating News Headline - Scrolling Text
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲24613.56 ▼0.885.63 ▲3.6742.81 ▼6.52
Dashboard /wp-admin2,277 ▲925.84 ▲0.0297.06 ▼19.9142.65 ▼1.75
Posts /wp-admin/edit.php2,174 ▲852.04 ▲0.0436.33 ▼0.1940.79 ▲2.93
Add New Post /wp-admin/post-new.php1,578 ▲4417.73 ▼5.35610.52 ▼49.5944.77 ▼13.14
Media Library /wp-admin/upload.php1,470 ▲824.26 ▲0.0695.95 ▼7.5648.38 ▲4.17
Docs /wp-admin/edit.php?post_type=floating_headline&page=ak-doc-page8942.0823.6737.49
Add Floating Headline /wp-admin/post-new.php?post_type=floating_headline2,2804.35104.85270.04
Our Theme /wp-admin/edit.php?post_type=floating_headline&page=sr-theme-page9952.0524.9445.82
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0712.0823.2229.21
All Floating Headline /wp-admin/edit.php?post_type=floating_headline1,1521.9932.0530.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=floating_headline
    • > Notice in wp-content/plugins/floating-news-headline/floating-news-headlines.php+92
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=floating_headline
    • > Notice in wp-content/plugins/floating-news-headline/floating-news-headlines.php+92
    Trying to access array offset on value of type null

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/floating-news-headline/docs.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/floating-news-headline/floating-headline-output.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/floating-news-headline/our-theme/awp-theme.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/floating-news-headline/class-tgm-plugin-activation.php:2109
    • > PHP Notice
      Undefined variable: fhs_id in wp-content/plugins/floating-news-headline/floating-headline-output.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=floating_headline
    • > Network (severe)
    wp-content/plugins/floating-news-headline/css/fh-uploader.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=floating_headline
    • > Network (severe)
    wp-content/plugins/floating-news-headline/css/bootstrap-iconpicker.min.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=floating_headline
    • > Network (severe)
    wp-content/plugins/floating-news-headline/js/fh-uploader.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=floating_headline
    • > Network (severe)
    wp-content/plugins/floating-news-headline/js/iconset-all.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=floating_headline
    • > Network (severe)
    wp-content/plugins/floating-news-headline/js/bootstrap-iconpicker.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=floating_headline
    • > Javascript (severe) in unknown
    /wp-content/plugins/floating-news-headline/js/bootstrap.js?ver=6.3.1 14:10 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3
    • > GET request to /wp-admin/edit.php?post_type=floating_headline&page=sr-theme-page
    • > Network (severe)
    wp-content/plugins/floating-news-headline/js/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 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: news headline, scrolling text, floating text, scrolling headline, news floating

floating-news-headline/floating-news-headlines.php 92% from 13 tests

This is the main PHP file of "Floating News Headline - Scrolling Text" version 1.2.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("floating-news-headline.php" instead of "floating-news-headlines.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
Success! There were no dangerous files found in this plugin18,765 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS8374913,715
PHP75621,6732,304
JavaScript36072041,660
SVG200973
PO File14749113

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.46
Average class complexity43.00
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods115
▷ Static methods54.35%
▷ Public methods9078.26%
▷ Protected methods2521.74%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.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.17MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/barrager/close.png3.88KB1.10KB▼ 71.64%
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%