74% vertical-news-scroller

Code Review | Vertical News Scroller

WordPress plugin Vertical News Scroller scored74%from 54 tests.

About plugin

  • Plugin page: vertical-news-scr...
  • Plugin version: 1.25
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2012
  • Latest release: Aug 26, 2023
  • Number of updates: 133
  • Update frequency: every 30.7 days
  • Top authors: nik00726 (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

7,000+ active /160,683 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼7.69ms] Passed 4 tests

Analyzing server-side resources used by Vertical News Scroller
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2946.06 ▲4.44
Dashboard /wp-admin3.60 ▲0.2555.81 ▼8.81
Posts /wp-admin/edit.php3.71 ▲0.3549.47 ▼4.97
Add New Post /wp-admin/post-new.php6.18 ▲0.2984.50 ▼21.42
Media Library /wp-admin/upload.php3.52 ▲0.2844.15 ▲10.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: 1 new table, 7 new options
New tables
wp_scroll_news
New WordPress options
widget_recent-comments
widget_vns_verticalscroll
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Vertical News Scroller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.72 ▲0.111.64 ▼0.2347.70 ▲2.18
Dashboard /wp-admin2,211 ▲345.62 ▼0.0286.44 ▼1.3941.99 ▲6.35
Posts /wp-admin/edit.php2,113 ▲131.94 ▼0.0635.87 ▼2.0932.62 ▼5.72
Add New Post /wp-admin/post-new.php1,539 ▲1323.65 ▲0.49630.64 ▼90.4247.00 ▼11.04
Media Library /wp-admin/upload.php1,419 ▲224.19 ▼0.0795.85 ▼2.5945.56 ▼1.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_scroll_news
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_vns_verticalscroll

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/vertical-news-scroller/newsScroller.php:13

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: vertical scrolling news, wordpress set post or page as news, news plugin wordpress, scrolling news wordpress, vertical news...

vertical-news-scroller/newsScroller.php 92% from 13 tests

This is the main PHP file of "Vertical News Scroller" version 1.25, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("vertical-news-scroller.php" instead of "newsScroller.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,705 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31621191,393
PHP1413261,249
CSS23763

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity12.25
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/g-suite-promo-code-4.png59.03KB17.19KB▼ 70.88%
images/300x250.png34.77KB13.75KB▼ 60.46%
images/desc.png0.16KB0.12KB▼ 23.31%
images/asc.png0.14KB0.12KB▼ 13.79%
images/300x250-wp-eng.png34.77KB13.75KB▼ 60.46%