94% advanced-steam-widget

Code Review | Advanced Steam Widget

WordPress plugin Advanced Steam Widget scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-steam-wi...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 5.8.1
  • First release: May 13, 2012
  • Latest release: Jun 17, 2018
  • Number of updates: 23
  • Update frequency: every 96.8 days
  • Top authors: harpercl (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 12,994 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼142.39ms] Passed 4 tests

Server-side resources used by Advanced Steam Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2133.56 ▲13.26
Dashboard /wp-admin3.16 ▲0.1047.00 ▲1.65
Posts /wp-admin/edit.php3.21 ▲0.1041.91 ▼2.44
Add New Post /wp-admin/post-new.php5.51 ▲0.0882.79 ▼569.78
Media Library /wp-admin/upload.php3.10 ▲0.1033.49 ▲1.00

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
widget_advancedsteamwidget

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Steam Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲7316.23 ▲0.377.12 ▼1.2047.08 ▼1.91
Dashboard /wp-admin2,970 ▲365.86 ▼0.09136.19 ▼9.72115.02 ▼4.25
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0163.76 ▼3.3293.21 ▲1.61
Add New Post /wp-admin/post-new.php1,498 ▼218.83 ▼0.04373.27 ▼3.97110.14 ▲4.64
Media Library /wp-admin/upload.php1,813 ▲65.00 ▼0.03147.05 ▲9.81119.03 ▼6.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-steam-widget/steam_widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Profile Only preset), #2 (Profile Small preset), #3 (Profile + Games preset), #4 (Games Only preset), #5 (Games Grid preset), #6 (Widget options)
Please take inspiration from this readme.txt

advanced-steam-widget/steam_widget.php 92% from 13 tests

"Advanced Steam Widget" version 1.7'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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-steam-widget.php" instead of "steam_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 plugin687 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18181687

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity72.00
▷ Minimum class complexity72.00
▷ Maximum class complexity72.00
Average method complexity7.45
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png25.30KB9.63KB▼ 61.95%
screenshot-1.png8.07KB4.47KB▼ 44.61%
screenshot-6.png25.02KB10.69KB▼ 57.26%
screenshot-2.png4.28KB2.66KB▼ 37.85%
screenshot-4.png9.95KB4.62KB▼ 53.57%