10% easy-php-sudoku-game

Code Review | Easy PHP Sudoku Game

WordPress plugin Easy PHP Sudoku Game scored10%from 54 tests.

About plugin

  • Plugin page: easy-php-sudoku-game
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-1.0.0
  • WordPress version: 6.3.1
  • First release: Sep 2, 2015
  • Latest release: Sep 2, 2015
  • Number of updates: 6
  • Update frequency: every 2.0 days
  • Top authors: hoangweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,271 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/easy-php-sudoku-game/libraries/hphp.php+306
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.64MB] [CPU: ▼48.01ms] Passed 4 tests

Analyzing server-side resources used by Easy PHP Sudoku Game
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.34 ▼1.117.40 ▼34.32
Dashboard /wp-admin2.36 ▼0.948.29 ▼41.44
Posts /wp-admin/edit.php2.37 ▼0.9911.23 ▼37.93
Add New Post /wp-admin/post-new.php2.37 ▼3.528.32 ▼78.33
Media Library /wp-admin/upload.php2.37 ▼0.869.48 ▼24.95

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

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

Browser metrics Passed 4 tests

Easy PHP Sudoku Game: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲15914.03 ▼0.355.93 ▲4.2542.34 ▼5.31
Dashboard /wp-admin2,202 ▲145.83 ▼0.04100.22 ▼15.1040.75 ▼4.18
Posts /wp-admin/edit.php2,097 ▲81.97 ▼0.0441.77 ▲5.4638.66 ▲4.76
Add New Post /wp-admin/post-new.php1,349 ▼19816.67 ▼1.44580.58 ▼25.4231.77 ▼26.77
Media Library /wp-admin/upload.php1,390 ▼14.21 ▼0.0593.89 ▼3.2639.77 ▼0.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/easy-php-sudoku-game/libraries/hphp.php+306
    Array and string offset access syntax with curly braces is deprecated
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • hw_sudoku
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-php-sudoku-game/includes/play.php
    • > /wp-content/plugins/easy-php-sudoku-game/libraries/hphp.constants.php
    • > /wp-content/plugins/easy-php-sudoku-game/libraries/hphp.php
    • > /wp-content/plugins/easy-php-sudoku-game/libraries/hphp.matrix.php
    • > /wp-content/plugins/easy-php-sudoku-game/libraries/hphp.plugin_file.php
    • > /wp-content/plugins/easy-php-sudoku-game/includes/functions.php
    • > /wp-content/plugins/easy-php-sudoku-game/libraries/init/require.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'hEle' not found in wp-content/plugins/easy-php-sudoku-game/libraries/hphp.Document.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'to_extend' not found in wp-content/plugins/easy-php-sudoku-game/libraries/hphp.class_Element.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'to_extend' not found in wp-content/plugins/easy-php-sudoku-game/libraries/hphp.file.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'hEle' not found in wp-content/plugins/easy-php-sudoku-game/libraries/hphp.forms.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'matrix' not found in wp-content/plugins/easy-php-sudoku-game/includes/sudoku.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'DRW' not found in wp-content/plugins/easy-php-sudoku-game/libraries/hphp.table_store.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === easy-php-sudoku-game === )
  • Screenshots: Add an image for screenshot #1 (Sudoku game screenshot)
The official readme.txt is a good inspiration

easy-php-sudoku-game/sudoku.php 85% from 13 tests

This is the main PHP file of "Easy PHP Sudoku Game" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-php-sudoku-game.php" instead of "sudoku.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin3,507 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP175143141,922
JavaScript123662231,418
CSS11126125
PO File18034
HTML1208

PHP code Passed 2 tests

Analyzing 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.60
Average class complexity28.18
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods182
▷ Static methods105.49%
▷ Public methods18098.90%
▷ Protected methods00.00%
▷ Private methods21.10%
Functions119
▷ Named functions10991.60%
▷ Anonymous functions108.40%
Constants22
▷ Global constants2195.45%
▷ Class constants14.55%
▷ Public constants1100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.79KB4.47KB▼ 65.06%