62% steam-library-gt

Code Review | Steam Library GT

WordPress plugin Steam Library GT scored62%from 54 tests.

About plugin

  • Plugin page: steam-library-gt
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 11, 2014
  • Latest release: Jul 20, 2014
  • Number of updates: 12
  • Update frequency: every 8.3 days
  • Top authors: virusav (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,819 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼63.79ms] Passed 4 tests

This is a short check of server-side resources used by Steam Library GT
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.01 ▼45.82
Dashboard /wp-admin2.10 ▼1.248.47 ▼60.94
Posts /wp-admin/edit.php2.10 ▼1.257.61 ▼50.06
Add New Post /wp-admin/post-new.php2.10 ▼3.787.03 ▼98.34
Media Library /wp-admin/upload.php2.10 ▼1.137.65 ▼34.11
Steam Library GT /wp-admin/options-general.php?page=steam_library-setting-admin2.108.63

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Steam Library GT
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.44 ▼0.9011.60 ▲9.6841.91 ▼0.39
Dashboard /wp-admin2,203 ▲295.68 ▲0.1388.60 ▼3.4543.34 ▲4.28
Posts /wp-admin/edit.php2,108 ▲112.02 ▼0.0039.39 ▼0.1734.10 ▼1.72
Add New Post /wp-admin/post-new.php1,533 ▼423.11 ▲5.07658.73 ▼24.9462.18 ▼9.62
Media Library /wp-admin/upload.php1,411 ▲144.19 ▲0.0093.71 ▼14.1043.27 ▼4.73
Steam Library GT /wp-admin/options-general.php?page=steam_library-setting-admin8442.0022.4429.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the steam.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=steam_library-setting-admin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the steam.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=steam_library-setting-admin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the font-awesome.min.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=steam_library-setting-admin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=steam_library-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=steam_library-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/steam-library-gt/ajax/game_details.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      simplexml_load_file(): http://thegamesdb.net/api/GetGame.php?name=:3: parser error : parsing XML declaration: '?>' expected in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 5
    • > PHP Notice
      Undefined index: name in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 3
    • > PHP Warning
      simplexml_load_file(): ^ in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 5
    • > PHP Warning
      simplexml_load_file(): update your programs in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 5
    • > PHP Warning
      simplexml_load_file(): update your programs in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 5
    • > PHP Warning
      simplexml_load_file(): update your programs in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/steam-library-gt/classes/SteamLibraryGTSettingsPage.php:142
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/steam-library-gt/classes/SteamLibraryGTSettingsPage.php:142
    • > PHP Warning
      simplexml_load_file(): ^ in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 5
    • > PHP Warning
      simplexml_load_file(): ^ in wp-content/plugins/steam-library-gt/ajax/game_details.php on line 5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

steam-library-gt/steam_library_gt.php 92% from 13 tests

The main file in "Steam Library GT" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("steam-library-gt.php" instead of "steam_library_gt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin4,249 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
CSS323121,604
Sass131922928
LESS121827907
SVG100414
PHP55675202
JavaScript1354150
Markdown122044

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 1.81MB with 1.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png810.62KB218.75KB▼ 73.01%
assets/screenshot-2.png977.32KB292.53KB▼ 70.07%
assets/screenshot-1.png64.74KB27.35KB▼ 57.75%