10% steam-achievements

Code Review | Wordpress Steam Achievement Plugin

WordPress plugin Wordpress Steam Achievement Plugin scored10%from 54 tests.

About plugin

  • Plugin page: steam-achievements
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Nov 17, 2014
  • Latest release: Nov 23, 2014
  • Number of updates: 5
  • Update frequency: every 3.8 days
  • Top authors: ajskelton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /841 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/steam-achievements/wpsteam-achievements.php+147
    Methods with the same name as their class will not be constructors in a future version of PHP; Wpsteamid_Achievement_Widget has a deprecated constructor

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.90ms] Passed 4 tests

A check of server-side resources used by Wordpress Steam Achievement Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.11 ▼4.46
Dashboard /wp-admin3.32 ▲0.0149.34 ▼3.20
Posts /wp-admin/edit.php3.37 ▲0.0149.46 ▼3.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.94 ▼32.67
Media Library /wp-admin/upload.php3.24 ▲0.0135.18 ▼2.52
Steam Achievements /wp-admin/options-general.php?page=wpsteam-achievements3.2535.00

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_wpsteamid_achievement_widget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Wordpress Steam Achievement Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲9213.41 ▼1.018.85 ▲6.7138.78 ▼5.19
Dashboard /wp-admin2,204 ▲245.61 ▼0.0886.77 ▼6.0239.50 ▼8.04
Posts /wp-admin/edit.php2,106 ▲62.05 ▲0.0339.49 ▼2.6137.06 ▼0.06
Add New Post /wp-admin/post-new.php1,536 ▲523.05 ▼0.22657.85 ▼52.4056.98 ▼2.56
Media Library /wp-admin/upload.php1,406 ▲64.24 ▼0.0196.67 ▼14.5046.29 ▲2.47
Steam Achievements /wp-admin/options-general.php?page=wpsteam-achievements8652.0523.9627.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_wpsteamid_achievement_widget
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/steam-achievements/inc/options-page-wrapper.php
    • > /wp-content/plugins/steam-achievements/inc/front-end.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/steam-achievements/wpsteam-achievements.php:33
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/steam-achievements/inc/widget-fields.php:3
    • > PHP Notice
      Undefined variable: after_title in wp-content/plugins/steam-achievements/inc/front-end.php on line 4
    • > PHP Notice
      Undefined variable: before_widget in wp-content/plugins/steam-achievements/inc/front-end.php on line 3
    • > PHP Notice
      Undefined variable: num_achievements in wp-content/plugins/steam-achievements/inc/front-end.php on line 9
    • > PHP Notice
      Undefined variable: before_title in wp-content/plugins/steam-achievements/inc/front-end.php on line 4
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/steam-achievements/inc/front-end.php on line 4
    • > PHP Notice
      Undefined variable: after_widget in wp-content/plugins/steam-achievements/inc/front-end.php on line 31
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/steam-achievements/wpsteam-achievements.php on line 19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: steam, achievements, team fortress

steam-achievements/wpsteam-achievements.php 92% from 13 tests

The principal PHP file in "Wordpress Steam Achievement Plugin" v. 0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("steam-achievements.php" instead of "wpsteam-achievements.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin385 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP510623305
CSS10073
JavaScript1207

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.23
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin