89% dino-game

Code Review | Dino Game - Embed Google Chrome Dinosaur Game in WordPress

WordPress plugin Dino Game - Embed Google Chrome Dinosaur Game in WordPress scored89%from 54 tests.

About plugin

  • Plugin page: dino-game
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2023
  • Latest release: Apr 29, 2023
  • Number of updates: 7
  • Update frequency: every 15.6 days
  • Top authors: tahmidulkarim (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /37,016 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.04ms] Passed 4 tests

Server-side resources used by Dino Game - Embed Google Chrome Dinosaur Game in WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.20 ▲0.84
Dashboard /wp-admin3.36 ▲0.0550.11 ▼2.78
Posts /wp-admin/edit.php3.41 ▲0.0554.27 ▼3.58
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.19 ▼18.63
Media Library /wp-admin/upload.php3.28 ▲0.0541.11 ▲2.60

Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/dino-game/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Dino Game - Embed Google Chrome Dinosaur Game in WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.29 ▼1.091.59 ▼0.6039.83 ▲0.16
Dashboard /wp-admin2,221 ▲154.87 ▼0.01105.31 ▼3.2240.43 ▼4.81
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0439.73 ▼2.3434.14 ▼4.88
Add New Post /wp-admin/post-new.php6,200 ▲4,65519.30 ▼3.76925.46 ▲222.3856.31 ▼4.11
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0396.70 ▼11.8344.24 ▼8.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: block, gutenberg, dinosaur, chrome, dino...

dino-game/dino-game.php 92% from 13 tests

The main PHP script in "Dino Game - Embed Google Chrome Dinosaur Game in WordPress" version 1.1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,960 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript44136851,815
PHP2313598
CSS19947

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/img/game-sprites-2x.png3.17KB3.52KB0.00%
src/img/dinogame-cover.png24.60KB2.50KB▼ 89.83%
src/img/game-sprites-1x.png2.58KB2.69KB0.00%
src/img/dino-game-block-icon.png6.08KB0.74KB▼ 87.80%