10% wp-game

Code Review | WP-Game

WordPress plugin WP-Game scored10%from 54 tests.

About plugin

  • Plugin page: wp-game
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Feb 27, 2015
  • Number of updates: 53
  • Update frequency: every 0.3 days
  • Top authors: mayxaybot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,361 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.15ms] Passed 4 tests

This is a short check of server-side resources used by WP-Game
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.49 ▼6.55
Dashboard /wp-admin3.35 ▲0.0452.44 ▼5.96
Posts /wp-admin/edit.php3.40 ▲0.0447.92 ▼5.86
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.84 ▼18.21
Media Library /wp-admin/upload.php3.27 ▲0.0441.39 ▲4.21

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 178 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
wp_game_plugin_page_id
wp_game_plugin_page_name
widget_recent-comments
db_upgraded
wp_game_plugin_page_title
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP-Game
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12214.33 ▼0.251.77 ▲0.1243.86 ▼1.23
Dashboard /wp-admin2,245 ▲655.55 ▼0.1190.28 ▼11.4040.01 ▼5.54
Posts /wp-admin/edit.php2,153 ▲531.98 ▼0.0535.89 ▲0.2134.80 ▼0.01
Add New Post /wp-admin/post-new.php1,578 ▲5218.40 ▼4.77687.62 ▲7.8967.59 ▲13.38
Media Library /wp-admin/upload.php1,450 ▲534.19 ▼0.01106.17 ▲0.5845.85 ▲1.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-game/index.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-game/games/Puzzle/Hextris/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-game/games/Arcade/Flying_Dog/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-game/games/Puzzle/Canvas_Tetris/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-game/games/Boardgame/2048/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-game/games/Puzzle/Pacman/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_footer() in wp-content/plugins/wp-game/templates/template-custom.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-game/games/Arcade/Crappy_Bird/index.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tested up to: Invalid plugin version format
Please take inspiration from this readme.txt

wp-game/index.php 92% from 13 tests

The entry point to "WP-Game" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-game.php" instead of "index.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-game/games/Arcade/Crappy_Bird/start.bat
24,662 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript544,3318,01917,309
CSS798152,517
SVG4002,483
PHP8180143995
Markdown71580585
Sass211330487
JSON110171
XML100105
Ruby1209
DOS Batch1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
29 PNG files occupy 0.28MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
games/Boardgame/2048/meta/apple-touch-startup-image-640x920.png41.04KB11.46KB▼ 72.08%
games/Arcade/Crappy_Bird/font_small_2.png0.09KB0.10KB0.00%
games/Arcade/Crappy_Bird/medal_gold.png0.28KB0.28KB0.00%
games/Puzzle/Hextris/images/twitter-opengraph.png16.85KB5.83KB▼ 65.39%
games/Arcade/Crappy_Bird/bird.png0.28KB0.28KB0.00%