10% steam-news-widget

Code Review | Steam News Widget

WordPress plugin Steam News Widget scored 10% from 54 tests.

About plugin

  • Plugin page: steam-news-widget
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.2.1
  • WordPress version: 5.8.1
  • First release: Mar 22, 2015
  • Latest release: May 7, 2015
  • Number of updates: 9
  • Update frequency: every 5.1 days
  • Top authors: softsultant (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 3,670 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/steam-news-widget/includes/ssg-steam-news-widget-internal.php+240
    Function create_function() is deprecated

Server metrics [RAM: ▼1.83MB] [CPU: ▼221.79ms] Passed 4 tests

An overview of server-side resources used by Steam News Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼0.925.87 ▼15.18
Dashboard /wp-admin1.82 ▼1.245.94 ▼30.47
Posts /wp-admin/edit.php1.82 ▼1.296.48 ▼34.23
Add New Post /wp-admin/post-new.php1.82 ▼3.615.48 ▼788.08
Media Library /wp-admin/upload.php1.82 ▼1.195.74 ▼34.38

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 1 new option
New WordPress options
widget_ssg-steam-news

Browser metrics Passed 4 tests

Steam News Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.90 ▲0.279.63 ▼0.3646.05 ▲2.34
Dashboard /wp-admin2,973 ▲425.93 ▼0.02137.79 ▼7.18111.50 ▲0.33
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0059.86 ▼6.2084.42 ▼8.94
Add New Post /wp-admin/post-new.php1,685 ▲1319.12 ▲0.34375.72 ▲2.04109.11 ▼6.97
Media Library /wp-admin/upload.php1,810 ▲35.03 ▼0.01147.44 ▼11.25118.31 ▼4.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/steam-news-widget/includes/ssg-steam-news-widget-internal.php+240
    Function create_function() is deprecated

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 19× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/steam-news-widget/includes/ssg-steam-news-widget-internal.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-wp-plugin-options-view.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-steam-news-generator-base.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-wp-gui-control.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-wp-gui-control-editbox.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-wp-cron.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-wp-steam-news-fetcher.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-template-processor.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-string-ops.php
    • > /wp-content/plugins/steam-news-widget/includes/swt-html-generator.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: steam, widget, game news, news, steampowered...

steam-news-widget/ssg-steam-news-widget.php 92% from 13 tests

"Steam News Widget" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("steam-news-widget.php" instead of "ssg-steam-news-widget.php")

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
Everything looks great! No dangerous files found in this plugin999 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1932015999

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.52
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes25
▷ Abstract classes312.00%
▷ Concrete classes2288.00%
▷ Final classes00.00%
Methods79
▷ Static methods56.33%
▷ Public methods4354.43%
▷ Protected methods2126.58%
▷ Private methods1518.99%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants51
▷ Global constants00.00%
▷ Class constants51100.00%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin