78% at-news-scroller

Code Review | AT News Scroller

WordPress plugin AT News Scroller scored78%from 54 tests.

About plugin

  • Plugin page: at-news-scroller
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.8.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2016
  • Latest release: Sep 15, 2021
  • Number of updates: 21
  • Update frequency: every 97.8 days
  • Top authors: AbhashTech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,416 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.38MB] [CPU: ▼7.82ms] Passed 4 tests

Server-side resources used by AT News Scroller
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4045.13 ▼4.12
Dashboard /wp-admin3.74 ▲0.3955.00 ▼5.15
Posts /wp-admin/edit.php3.79 ▲0.4345.06 ▼9.05
Add New Post /wp-admin/post-new.php6.26 ▲0.3785.61 ▼12.96
Media Library /wp-admin/upload.php3.60 ▲0.3737.91 ▲4.09
Install Plugins /wp-admin/plugins.php?page=install-required-plugins3.7634.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for AT News Scroller
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.66 ▼0.516.09 ▲4.3442.47 ▲0.87
Dashboard /wp-admin2,237 ▲465.87 ▲0.96110.98 ▲8.6547.15 ▲4.14
Posts /wp-admin/edit.php2,128 ▲362.05 ▲0.0135.89 ▼5.0839.83 ▲2.47
Add New Post /wp-admin/post-new.php1,541 ▲817.49 ▼5.82634.08 ▼58.1955.61 ▼6.28
Media Library /wp-admin/upload.php1,430 ▲454.41 ▲0.2197.29 ▼4.3045.45 ▲0.24
Install Plugins /wp-admin/plugins.php?page=install-required-plugins9592.0626.6730.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/at-news-scroller/includes/init.js.php
    • > /wp-content/plugins/at-news-scroller/plugin.php
    • > /wp-content/plugins/at-news-scroller/trunk/includes/init.js.php
    • > /wp-content/plugins/at-news-scroller/trunk/includes/style.php
    • > /wp-content/plugins/at-news-scroller/trunk/plugin.php
    • > /wp-content/plugins/at-news-scroller/includes/style.php
  • 138× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/at-news-scroller/trunk/includes/style.php on line 65
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/at-news-scroller/includes/style.php on line 14
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/at-news-scroller/includes/style.php on line 14
    • > PHP Notice
      Undefined variable: at_news_scroller in wp-content/plugins/at-news-scroller/trunk/includes/ticker.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_recent_posts() in wp-content/plugins/at-news-scroller/trunk/includes/ticker.php:12
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/at-news-scroller/trunk/includes/style.php on line 14
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/at-news-scroller/trunk/includes/style.php on line 29
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/at-news-scroller/includes/style.php on line 42
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/at-news-scroller/trunk/includes/style.php on line 54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/at-news-scroller/trunk/includes/functions.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
4 plugin tags: news, latest post scroller, scroll, ticker

at-news-scroller/plugin.php 92% from 13 tests

The main PHP script in "AT News Scroller" version 0.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("at-news-scroller.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin6,507 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript836646333,405
PHP125471,5562,216
CSS315120715
Markdown134080
Bourne Shell124055
JSON10036

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity35.33
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods192
▷ Static methods126.25%
▷ Public methods15279.17%
▷ Protected methods4020.83%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/extensions/extensions/vendor_support/vendor/select2/select2.png0.60KB0.99KB0.00%
trunk/includes/extensions/extensions/vendor_support/vendor/select2/select2.png0.60KB0.99KB0.00%
includes/extensions/extensions/vendor_support/vendor/select2/select2x2.png0.83KB0.77KB▼ 6.15%
trunk/includes/extensions/extensions/vendor_support/vendor/select2/select2x2.png0.83KB0.77KB▼ 6.15%