72% responsive-news-scroller

Code Review | wordpress responsive scroller

WordPress plugin wordpress responsive scroller scored72%from 54 tests.

About plugin

  • Plugin page: responsive-news-s...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Mar 26, 2016
  • Number of updates: 27
  • Update frequency: every 7.9 days
  • Top authors: aumsrini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,937 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.80ms] Passed 4 tests

An overview of server-side resources used by wordpress responsive scroller
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.79 ▼0.27
Dashboard /wp-admin3.35 ▲0.0548.90 ▼2.89
Posts /wp-admin/edit.php3.40 ▲0.0549.49 ▼4.04
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.54 ▼16.01
Media Library /wp-admin/upload.php3.27 ▲0.0537.65 ▲0.67
Add News /wp-admin/post-new.php?post_type=wpr_scroller_news3.4967.23
Scroller News /wp-admin/edit.php?post_type=wpr_scroller_news3.3240.01
WPR Scroller Settings /wp-admin/options-general.php?page=my-setting-admin3.2429.78
News Category /wp-admin/edit-tags.php?taxonomy=categorys&post_type=wpr_scroller_news3.2736.25

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for wordpress responsive scroller
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲20614.07 ▼0.686.88 ▲5.1745.11 ▲2.47
Dashboard /wp-admin2,244 ▲565.81 ▲0.8997.80 ▼11.9239.47 ▼6.17
Posts /wp-admin/edit.php2,130 ▲412.02 ▲0.0533.21 ▼3.7234.14 ▼7.15
Add New Post /wp-admin/post-new.php1,549 ▲2523.10 ▼0.07636.24 ▼50.0754.82 ▼3.08
Media Library /wp-admin/upload.php1,429 ▲414.17 ▼0.02100.61 ▼11.8444.65 ▼2.86
Add News /wp-admin/post-new.php?post_type=wpr_scroller_news2,7757.84186.1283.12
Scroller News /wp-admin/edit.php?post_type=wpr_scroller_news1,1452.0132.0430.78
WPR Scroller Settings /wp-admin/options-general.php?page=my-setting-admin8472.0524.6828.97
News Category /wp-admin/edit-tags.php?taxonomy=categorys&post_type=wpr_scroller_news1,3002.1427.8027.91

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/responsive-news-scroller/public/partials/wpr-scroller-public-display.php
    • > /wp-content/plugins/responsive-news-scroller/wpr-news.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-news-scroller/admin/class-wpr-scroller-admin.php:41

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=categorys&post_type=wpr_scroller_news
    • > Network (severe)
    wp-content/plugins/admin/admin/css/wpr-scroller-admin.css - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=my-setting-admin
    • > Network (severe)
    wp-content/plugins/responsive-news-scroller/admin/img/setting-icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === responsive-news-scroller === )
You can take inspiration from this readme.txt

responsive-news-scroller/wpr-scroller.php 85% from 13 tests

The entry point to "wordpress responsive scroller" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("responsive-news-scroller.php" instead of "wpr-scroller.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin588 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13193583336
CSS3375147
JavaScript32627105

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.62
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.16
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin