90% dinosaur-game

Code Review | Dinosaur Game

WordPress plugin Dinosaur Game scored90%from 54 tests.

About plugin

  • Plugin page: dinosaur-game
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Feb 14, 2019
  • Latest release: Apr 10, 2023
  • Number of updates: 29
  • Update frequency: every 52.3 days
  • Top authors: chrisdavidmiles (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /74,815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Dinosaur Game
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.86 ▼3.96
Dashboard /wp-admin3.31 ▼0.0450.65 ▼12.65
Posts /wp-admin/edit.php3.36 ▲0.0049.90 ▲1.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.32 ▲0.66
Media Library /wp-admin/upload.php3.23 ▲0.0039.33 ▲6.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dinosaur Game
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2813.95 ▼0.362.18 ▲0.5040.98 ▼2.03
Dashboard /wp-admin2,195 ▲185.64 ▼0.0390.14 ▼3.8339.49 ▼3.85
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0639.16 ▲1.0934.44 ▼3.52
Add New Post /wp-admin/post-new.php1,554 ▲2322.94 ▼0.03650.48 ▲32.2452.98 ▲2.72
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.0899.61 ▼39.6844.12 ▼4.85

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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: chrome, game, shortcode, dinosaur, chromium

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

The primary PHP file in "Dinosaur Game" version 1.0.7 is used by WordPress to initiate all plugin functionality
90 characters long description:
Add the dinosaur game from Google Chrome to your site using the [dinosaur-game] shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,775 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24016751,677
PHP3243856
CSS291842

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
game-sprites-1x.png2.58KB2.69KB0.00%
game-sprites-2x.png3.17KB3.52KB0.00%