84% game-showcase

Code Review | Game Showcase

WordPress plugin Game Showcase scored84%from 54 tests.

About plugin

  • Plugin page: game-showcase
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Nov 27, 2017
  • Latest release: Mar 5, 2018
  • Number of updates: 8
  • Update frequency: every 14.3 days
  • Top authors: eriksaulnier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,833 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.28MB] [CPU: ▼0.46ms] Passed 4 tests

This is a short check of server-side resources used by Game Showcase
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2642.10 ▼1.83
Dashboard /wp-admin3.62 ▲0.3165.33 ▲7.29
Posts /wp-admin/edit.php3.68 ▲0.3261.06 ▲10.36
Add New Post /wp-admin/post-new.php6.22 ▲0.3393.58 ▼12.14
Media Library /wp-admin/upload.php3.46 ▲0.2340.37 ▲4.83
Genres /wp-admin/edit-tags.php?taxonomy=game_genre&post_type=game3.4844.41
All Games /wp-admin/edit.php?post_type=game3.5344.82
Add New /wp-admin/post-new.php?post_type=game6.2290.22
Showcases /wp-admin/edit-tags.php?taxonomy=game_showcase&post_type=game3.4841.82

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_game-showcase-widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Game Showcase
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,073 ▲28714.87 ▲0.506.96 ▲3.9042.54 ▲2.83
Dashboard /wp-admin2,363 ▲1866.23 ▲0.66120.82 ▲26.5838.20 ▼8.00
Posts /wp-admin/edit.php2,296 ▲1963.48 ▲1.5470.90 ▲33.6036.75 ▼2.57
Add New Post /wp-admin/post-new.php1,548 ▲2223.41 ▼0.40676.38 ▼10.0265.17 ▲8.76
Media Library /wp-admin/upload.php1,436 ▲364.23 ▲0.02105.20 ▼4.1149.47 ▲3.37
Genres /wp-admin/edit-tags.php?taxonomy=game_genre&post_type=game1,4733.2546.7433.14
All Games /wp-admin/edit.php?post_type=game1,3473.4146.6229.72
Add New /wp-admin/post-new.php?post_type=game6,24324.90878.0529.63
Showcases /wp-admin/edit-tags.php?taxonomy=game_showcase&post_type=game1,4453.2642.9232.39

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_game-showcase-widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 2× 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/game-showcase/includes/class-game-showcase-widget.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/game-showcase/public/partials/single-game.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: games, showcase

game-showcase/game-showcase.php Passed 13 tests

The main PHP file in "Game Showcase" ver. 1.2.3 adds more information about the plugin and also serves as the entry point for this plugin
48 characters long description:
Adds the ability to showcase games on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,112 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14222635835
JavaScript4152295
Sass216094
CSS4181888

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.32
Average class complexity9.44
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods52
▷ Static methods23.85%
▷ Public methods4586.54%
▷ Protected methods00.00%
▷ Private methods713.46%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected