52% game-application-form-cloudsgoods

Code Review | Game application form CloudsGoods

WordPress plugin Game application form CloudsGoods scored52%from 54 tests.

About plugin

  • Plugin page: game-application-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1.1
  • WordPress version: 6.3.1
  • First release: May 15, 2023
  • Latest release: May 16, 2023
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: cloudsgoods (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /122 total downloads

Benchmarks

Plugin footprint 46% from 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.81MB] [CPU: ▲540.10ms] 50% from 4 tests

An overview of server-side resources used by Game application form CloudsGoods
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,257.69ms on /wp-admin/admin.php?page=cgsrv_menu_adminpageprofile)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 540.10ms on /wp-admin/admin.php?page=cgsrv_menu_adminpageprofile)
PageMemory (MB)CPU Time (ms)
Home /4.37 ▲0.9145.02 ▲0.02
Dashboard /wp-admin4.96 ▲1.65802.55 ▲748.23
Posts /wp-admin/edit.php4.96 ▲1.60788.37 ▲737.20
Add New Post /wp-admin/post-new.php4.96 ▼0.93779.29 ▲674.93
Media Library /wp-admin/upload.php4.96 ▲1.73833.13 ▲795.54
My Games /wp-admin/admin.php?page=cgsrv_menu_adminpagemygames5.19838.19
Packages /wp-admin/admin.php?page=cgsrv_menu_adminpagetarif5.151,414.29
CloudsGoods /wp-admin/admin.php?page=cgsrv_menu_adminpage5.21826.08
Create Game /wp-admin/admin.php?page=cgsrv_menu_adminpagecreategame5.181,138.81
Issue prizes /wp-admin/admin.php?page=cgsrv_menu_adminpageissueprize5.17777.73
Contacts /wp-admin/admin.php?page=cgsrv_menu_adminpagecontacts5.17810.43
Profile /wp-admin/admin.php?page=cgsrv_menu_adminpageprofile5.191,257.69

Server storage [IO: ▲6.76MB] [DB: ▲0.07MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • You have illegally modified 3 files (0.00KB) outside of "wp-content/plugins/game-application-form-cloudsgoods/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/game-application-form-cloudsgoods/assets/icon-128\321\205128.png"
    • (new file) "wp-content/plugins/game-application-form-cloudsgoods/assets/banner-1544\321\205500.png"
    • (new file) "wp-content/plugins/game-application-form-cloudsgoods/assets/icon-256\321\205256.png"
Filesystem: 243 new files
Database: 1 new table, 7 new options
New tables
wp_cloudsgoods_data
New WordPress options
can_compress_scripts
widget_cgsrv_custom_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Game application form CloudsGoods
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲9914.28 ▼0.151.93 ▼0.0241.81 ▼1.94
Dashboard /wp-admin2,244 ▲705.59 ▼0.0584.57 ▼11.3781.66 ▲34.46
Posts /wp-admin/edit.php2,149 ▲492.11 ▲0.0733.99 ▼6.2834.46 ▼2.64
Add New Post /wp-admin/post-new.php1,564 ▲3323.34 ▲0.17748.70 ▲62.5961.34 ▼0.29
Media Library /wp-admin/upload.php1,443 ▲434.25 ▲0.0399.17 ▲1.0873.46 ▲29.67
My Games /wp-admin/admin.php?page=cgsrv_menu_adminpagemygames4,8781.7330.4966.91
Packages /wp-admin/admin.php?page=cgsrv_menu_adminpagetarif4,8781.7734.3656.08
CloudsGoods /wp-admin/admin.php?page=cgsrv_menu_adminpage4,8811.7434.5452.59
Create Game /wp-admin/admin.php?page=cgsrv_menu_adminpagecreategame4,8381.7735.3557.60
Issue prizes /wp-admin/admin.php?page=cgsrv_menu_adminpageissueprize4,8751.7632.0655.43
Contacts /wp-admin/admin.php?page=cgsrv_menu_adminpagecontacts4,8811.7631.0755.32
Profile /wp-admin/admin.php?page=cgsrv_menu_adminpageprofile4,8751.7832.8457.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/game-application-form-cloudsgoods/app/Hooks/Menu/CloudsGoodsMenuClass.php+28
    Undefined index: page
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_cloudsgoods_data
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_cgsrv_custom_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cgsrv_menu_adminpagetarif
    • > Notice in wp-content/plugins/game-application-form-cloudsgoods/app/Hooks/Menu/CloudsGoodsTarifClass.php+35
    Undefined index: data

SRP 0% 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
Almost there! Just fix the following items
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/issue-prize.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/creategame/preview.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/creategame/main.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/assets/include/pagination.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/admin.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/creategame/choicegame.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/creategame/settinggame.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/statisticsgame.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/tarif.blade.php
    • > /wp-content/plugins/game-application-form-cloudsgoods/views/profile.blade.php
  • 70× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CloudsGoodsApp\\Hooks\\Menu\\CloudsGoodsTarifClass' not found in wp-content/plugins/game-application-form-cloudsgoods/app/Hooks/Menu/CloudsGoodsProfileClass.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/promises/src/CancellationException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/psr7/src/Uri.php:17
    • > PHP Notice
      Undefined variable: activeGames in wp-content/plugins/game-application-form-cloudsgoods/views/tarif.blade.php on line 96
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/psr7/src/UploadedFile.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/psr7/src/Request.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/game-application-form-cloudsgoods/lib/guzzlehttp/promises/src/AggregateException.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: advertisement, contacts, game, gather, loyalty...

game-application-form-cloudsgoods/CGPlugin.php 92% from 13 tests

"Game application form CloudsGoods" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("game-application-form-cloudsgoods.php" instead of "CGPlugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected24,209 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1432,5907,91313,948
Blade15666154,922
Markdown151,28403,672
JSON11001,173
CSS1750487
YAML1007

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity14.84
▷ Minimum class complexity1.00
▷ Maximum class complexity349.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces17
Interfaces26
Traits6
Classes95
▷ Abstract classes00.00%
▷ Concrete classes95100.00%
▷ Final classes3536.84%
Methods1,099
▷ Static methods15914.47%
▷ Public methods84676.98%
▷ Protected methods13612.37%
▷ Private methods11710.65%
Functions140
▷ Named functions3625.71%
▷ Anonymous functions10474.29%
Constants73
▷ Global constants45.48%
▷ Class constants6994.52%
▷ Public constants5884.06%

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
32 compressed PNG files occupy 5.52MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/settings/screenshots/4.png7.15KB7.16KB0.00%
assets/images/tariffs/special.png20.76KB8.53KB▼ 58.90%
assets/settings/screenshots/13.png18.16KB18.16KB0.00%
assets/settings/screenshots/7.png401.12KB401.08KB0.01%
assets/settings/instructions/4.png19.88KB20.23KB0.00%