84% casino-games

Code Review | Casino Games

WordPress plugin Casino Games scored84%from 54 tests.

About plugin

  • Plugin page: casino-games
  • Plugin version: 1.38
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2023
  • Latest release: Jun 29, 2023
  • Number of updates: 5
  • Update frequency: every 18.4 days
  • Top authors: flytonic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,054 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲1.22ms] Passed 4 tests

A check of server-side resources used by Casino Games
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0847.20 ▲4.66
Dashboard /wp-admin3.38 ▲0.0849.95 ▲1.46
Posts /wp-admin/edit.php3.43 ▲0.0849.07 ▲1.79
Add New Post /wp-admin/post-new.php5.96 ▲0.0892.99 ▼0.81
Media Library /wp-admin/upload.php3.30 ▲0.0837.87 ▲2.44
Document /wp-admin/edit.php?post_type=casino_game&page=casino_game_document3.2730.61
Add New Game /wp-admin/post-new.php?post_type=casino_game3.3646.15
Casino Games /wp-admin/edit.php?post_type=casino_game3.3533.86

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Casino Games
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.15 ▼1.431.78 ▼0.0938.09 ▼5.92
Dashboard /wp-admin2,237 ▲635.90 ▲1.0193.99 ▼24.0539.36 ▼8.27
Posts /wp-admin/edit.php2,120 ▲312.01 ▲0.0240.76 ▲1.6836.30 ▲1.97
Add New Post /wp-admin/post-new.php1,540 ▲717.65 ▼5.41680.43 ▼8.8057.32 ▼6.13
Media Library /wp-admin/upload.php1,422 ▲344.23 ▲0.08101.77 ▼4.5346.04 ▼0.51
Document /wp-admin/edit.php?post_type=casino_game&page=casino_game_document8262.0634.4925.08
Add New Game /wp-admin/post-new.php?post_type=casino_game1,7523.6460.4431.64
Casino Games /wp-admin/edit.php?post_type=casino_game1,0922.0230.7130.39

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/casino-games/includes/casino-game-plugin-setup.php:25

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in casino-games/assets to your readme.txt
The official readme.txt is a good inspiration

casino-games/casino_games.php 92% from 13 tests

The entry point to "Casino Games" version 1.38 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("casino-games.php" instead of "casino_games.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin242 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP616124241
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected