Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲1.03MB] [CPU: ▲153.39ms] Passed 4 tests
This is a short check of server-side resources used by CardzNet - Multiplayer Card Games
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.63 ▲1.16 | 190.11 ▲150.35 |
Dashboard /wp-admin | 4.33 ▲1.03 | 189.52 ▲142.31 |
Posts /wp-admin/edit.php | 4.38 ▲1.03 | 210.14 ▲166.09 |
Add New Post /wp-admin/post-new.php | 6.93 ▲1.05 | 245.04 ▲154.79 |
Media Library /wp-admin/upload.php | 4.25 ▲1.02 | 442.07 ▲409.75 |
Games /wp-admin/admin.php?page=wpcardznet_games | 4.23 | 206.36 |
Overview /wp-admin/admin.php?page=wpcardznet_adminmenu | 4.23 | 176.66 |
Groups /wp-admin/admin.php?page=wpcardznet_groups | 4.23 | 189.41 |
Settings /wp-admin/admin.php?page=wpcardznet_settings | 4.23 | 173.12 |
Server storage [IO: ▲3.11MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 114 new files
Database: 10 new tables, 6 new options
New tables |
---|
wp_cardznet_games |
wp_cardznet_settings |
wp_cardznet_hands |
wp_cardznet_groups |
wp_cardznet_members |
wp_cardznet_players |
wp_cardznet_rounds |
wp_cardznet_tricks |
wp_cardznet_invites |
wp_cardznet_sessions |
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for CardzNet - Multiplayer Card Games
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,969 ▲208 | 13.47 ▼0.89 | 7.64 ▲6.08 | 35.50 ▼4.35 |
Dashboard /wp-admin | 2,242 ▲65 | 5.60 ▼0.01 | 80.89 ▼2.81 | 39.03 ▼5.36 |
Posts /wp-admin/edit.php | 2,150 ▲50 | 1.98 ▲0.02 | 39.12 ▲1.87 | 35.48 ▲0.84 |
Add New Post /wp-admin/post-new.php | 1,723 ▲195 | 22.43 ▼0.44 | 605.00 ▼50.13 | 58.29 ▼17.15 |
Media Library /wp-admin/upload.php | 1,450 ▲53 | 4.17 ▼0.03 | 102.10 ▲1.30 | 45.49 ▲0.77 |
Games /wp-admin/admin.php?page=wpcardznet_games | 835 | 2.17 | 27.24 | 28.21 |
Overview /wp-admin/admin.php?page=wpcardznet_adminmenu | 814 | 2.18 | 24.38 | 23.60 |
Groups /wp-admin/admin.php?page=wpcardznet_groups | 814 | 2.18 | 23.72 | 25.48 |
Settings /wp-admin/admin.php?page=wpcardznet_settings | 1,405 | 1.68 | 26.02 | 32.86 |
Uninstaller [IO: ▲0.23MB] [DB: ▲0.01MB] 50% 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
- Zombie tables detected upon uninstall: 10 tables
- wp_cardznet_rounds
- wp_cardznet_groups
- wp_cardznet_tricks
- wp_cardznet_players
- wp_cardznet_hands
- wp_cardznet_games
- wp_cardznet_members
- wp_cardznet_settings
- wp_cardznet_invites
- wp_cardznet_sessions
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpcardznet_settings
- > Warning in wp-content/plugins/cardznet/include/wpcardznetlib_dbase_api.php+1598
session_start(): Cannot start session when headers already sent
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpcardznet_games
- > request to
- > Notice in wp-config.php+20
Undefined index: REQUEST_METHOD
SRP 50% 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
Almost there! Just fix the following items
- 91× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
include(): Failed opening 'WPCARDZNETLIB_INCLUDE_PATHwpcardznet_tabletop.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cardznet/games/wpcardznet_whist.php on line 22
- > PHP Warning
include(): Failed opening 'WPCARDZNETLIB_INCLUDE_PATHwpcardznet_tabletop.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cardznet/games/wpcardznet_rummy.php on line 22
- > PHP Warning
Use of undefined constant WPCARDZNET_GAMES_PATH - assumed 'WPCARDZNET_GAMES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cardznet/games/wpcardznet_hearts.php on line 22
- > PHP Fatal error
require_once(): Failed opening required 'WPCARDZNET_INCLUDE_PATHwpcardznetlib_adminlist.php' (include_path='.:/usr/share/php') in wp-content/plugins/cardznet/admin/wpcardznet_manage_settings.php on line 23
- > PHP Warning
Use of undefined constant WPCARDZNET_INCLUDE_PATH - assumed 'WPCARDZNET_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cardznet/admin/wpcardznet_manage_groups.php on line 23
- > PHP Fatal error
Uncaught Error: Class 'WPCardzNetLibDBaseClass' not found in wp-content/plugins/cardznet/include/wpcardznet_dbase_api.php:62
- > PHP Fatal error
Uncaught Error: Class 'WPCardzNetLibUtilsClass' not found in wp-content/plugins/cardznet/test/wpcardznetlib_testbase.php:23
- > PHP Fatal error
Uncaught Error: Class 'WPCardzNetCardsClass' not found in wp-content/plugins/cardznet/games/wpcardznet_whist.php:26
- > PHP Fatal error
Uncaught Error: Class 'WPCardzNetLibTableClass' not found in wp-content/plugins/cardznet/include/wpcardznetlib_adminlist.php:27
- > PHP Warning
Use of undefined constant WPCARDZNET_INCLUDE_PATH - assumed 'WPCARDZNET_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cardznet/admin/wpcardznet_debug.php on line 23
- > PHP Warning
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 errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Tags: You are using too many tags: 12 tag instead of maximum 10
cardznet/wpcardznet.php 92% from 13 tests
The main PHP file in "CardzNet - Multiplayer Card Games" ver. 2.5.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("cardznet.php" instead of "wpcardznet.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected19,492 lines of code in 63 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 42 | 3,918 | 2,202 | 14,107 |
JavaScript | 10 | 945 | 556 | 3,589 |
CSS | 10 | 316 | 235 | 1,742 |
XML | 1 | 0 | 0 | 54 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 38.27 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 271.00 |
Average method complexity | 3.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 73.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 52 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 52 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 867 | |
▷ Static methods | 123 | 14.19% |
▷ Public methods | 865 | 99.77% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 0.23% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 277 | |
▷ Global constants | 172 | 62.09% |
▷ Class constants | 105 | 37.91% |
▷ Public constants | 105 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
28 PNG files occupy 1.51MB with 0.88MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
games/images/goout.png | 10.87KB | 0.59KB | ▼ 94.58% |
images/swop.png | 0.89KB | 0.80KB | ▼ 9.15% |
images/fullscreen.png | 6.64KB | 0.10KB | ▼ 98.46% |
images/hearts.png | 3.82KB | 3.04KB | ▼ 20.56% |
images/clubs.png | 4.42KB | 1.36KB | ▼ 69.33% |