84% snackgame

Code Review | Snack Game

WordPress plugin Snack Game scored84%from 54 tests.

About plugin

  • Plugin page: snackgame
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2015
  • Latest release: Nov 4, 2017
  • Number of updates: 9
  • Update frequency: every 111.6 days
  • Top authors: looklikeme05 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,071 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.00MB] [CPU: ▼8.61ms] Passed 4 tests

An overview of server-side resources used by Snack Game
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.37 ▼2.27
Dashboard /wp-admin3.32 ▼0.0355.58 ▼9.20
Posts /wp-admin/edit.php3.37 ▲0.0149.22 ▼2.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.97 ▼20.97
Media Library /wp-admin/upload.php3.24 ▲0.0136.44 ▲0.86

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Snack Game
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.37 ▲0.021.78 ▲0.1843.05 ▼3.87
Dashboard /wp-admin2,198 ▲215.62 ▲0.0886.26 ▼13.5341.69 ▼2.03
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0435.89 ▼0.0935.90 ▲0.58
Add New Post /wp-admin/post-new.php1,526 ▼223.42 ▲0.43674.49 ▼1.5148.85 ▼3.62
Media Library /wp-admin/upload.php1,403 ▲64.25 ▲0.04100.84 ▼9.4342.16 ▼3.33

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/snackgame/index.php:166

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: web snack game, html5 snack game, canvas snack game, html snack game, snack game

snackgame/index.php 92% from 13 tests

The principal PHP file in "Snack Game" v. 1.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("snackgame.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected142 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1817142

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Constants0
▷ Global constants00.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