84% widget-for-retro-games-achievements

Code Review | Widget for Retro Games Achievements

WordPress plugin Widget for Retro Games Achievements scored84%from 54 tests.

About plugin

  • Plugin page: widget-for-retro-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Mar 10, 2017
  • Number of updates: 7
  • Update frequency: every 8.6 days
  • Top authors: hiscorebob (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /646 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.15ms] Passed 4 tests

Server-side resources used by Widget for Retro Games Achievements
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.60 ▼11.01
Dashboard /wp-admin3.34 ▼0.0048.76 ▼9.50
Posts /wp-admin/edit.php3.39 ▲0.0451.81 ▲2.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.46 ▼6.91
Media Library /wp-admin/upload.php3.27 ▲0.0436.99 ▲6.92

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_rtrgmsach_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Widget for Retro Games Achievements
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.13 ▼1.251.70 ▼0.3739.39 ▼4.12
Dashboard /wp-admin2,209 ▲184.86 ▼0.04102.43 ▼13.5142.08 ▼3.30
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0144.50 ▲8.5846.07 ▲13.28
Add New Post /wp-admin/post-new.php1,534 ▲623.34 ▲4.80660.49 ▲10.8353.60 ▲1.58
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.06109.23 ▲14.0445.88 ▲1.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_rtrgmsach_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/widget-for-retro-games-achievements/widget_for_retro_games_achievements.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
2 plugin tags: widget, retro achievements

widget-for-retro-games-achievements/widget_for_retro_games_achievements.php 85% from 13 tests

The main PHP script in "Widget for Retro Games Achievements" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("widget-for-retro-games-achievements.php" instead of "widget_for_retro_games_achievements.php")
  • Description: The description should be shorter than 140 characters (currently 407 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin224 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22238224

PHP code Passed 2 tests

A brief analysis 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.19
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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 files were detected