94% snake

Code Review | Snake

WordPress plugin Snake scored 94% from 54 tests.

About plugin

  • Plugin page: snake
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.9
  • WordPress version: 5.9.2
  • First release: Apr 1, 2013
  • Latest release: Nov 9, 2017
  • Number of updates: 16
  • Update frequency: every 105.2 days
  • Top authors: camilstaps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,890 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Snake
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.4182.84 ▲49.52
Dashboard /wp-admin3.42 ▲0.0152.03 ▲18.30
Posts /wp-admin/edit.php3.65 ▲0.0138.60 ▼2.39
Add New Post /wp-admin/post-new.php6.89 ▼0.0899.49 ▼1,192.15
Media Library /wp-admin/upload.php3.31 ▲0.0140.76 ▼7.70
Snake /wp-admin/options-general.php?page=snake3.2722.13

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
snake_rounded_borders

Browser metrics Passed 4 tests

This is an overview of browser requirements for Snake
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1416.04 ▲0.427.39 ▲0.652.29 ▼0.41
Dashboard /wp-admin2,897 ▲406.13 ▼0.00128.16 ▲1.04200.63 ▼17.77
Posts /wp-admin/edit.php2,690 ▼13.24 ▲0.0264.17 ▼5.51148.96 ▼12.83
Add New Post /wp-admin/post-new.php1,664 ▼2616.33 ▼4.81459.18 ▼39.33171.84 ▼1.20
Media Library /wp-admin/upload.php1,703 ▲85.53 ▲0.04164.29 ▲3.55210.33 ▼209.81
Snake /wp-admin/options-general.php?page=snake1,0562.4468.68180.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/snake/snake.php:28

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 uses markdown syntax to describe your plugin to the world
2 plugin tags: snake, game

snake/snake.php Passed 13 tests

"Snake" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
Let your users play snake on your website!

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
Success! There were no dangerous files found in this plugin271 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1310164
CSS18060
PHP1122347

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin