77% chessgame-shizzle

Code Review | Chessgame Shizzle

WordPress plugin Chessgame Shizzle scored77%from 54 tests.

About plugin

  • Plugin page: chessgame-shizzle
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.4
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Oct 28, 2023
  • Number of updates: 271
  • Update frequency: every 8.9 days
  • Top authors: mpol (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /10,318 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼6.85ms] Passed 4 tests

Server-side resources used by Chessgame Shizzle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1735.51 ▼3.53
Dashboard /wp-admin3.48 ▲0.1845.01 ▼2.63
Posts /wp-admin/edit.php3.60 ▲0.2443.90 ▼3.85
Add New Post /wp-admin/post-new.php6.08 ▲0.2083.17 ▼17.40
Media Library /wp-admin/upload.php3.41 ▲0.1935.04 ▲3.20
Import /wp-admin/edit.php?post_type=cs_chessgame&page=cs_import3.3932.84
Categories /wp-admin/edit-tags.php?taxonomy=cs_category&post_type=cs_chessgame3.4134.60
About /wp-admin/edit.php?post_type=cs_chessgame&page=cs_about3.3830.42
All Chessgames /wp-admin/edit.php?post_type=cs_chessgame3.4637.01
Settings /wp-admin/edit.php?post_type=cs_chessgame&page=cs_settings3.3930.77
Export /wp-admin/edit.php?post_type=cs_chessgame&page=cs_export3.4034.93
Tags /wp-admin/edit-tags.php?taxonomy=cs_tag&post_type=cs_chessgame3.4132.77
New Chessgame /wp-admin/post-new.php?post_type=cs_chessgame3.6763.69

Server storage [IO: ▲2.58MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 558 new files
Database: no new tables, 19 new options
New WordPress options
widget_featured-chessgame
widget_search-chessgame
widget_theysaidso_widget
widget_recent-chessgames
chessgame_shizzle-piecetheme
theysaidso_admin_options
widget_newest-chessgame
widget_recent-comments
can_compress_scripts
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Chessgame Shizzle
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,005 ▲24414.23 ▼0.127.87 ▲6.2441.62 ▲5.51
Dashboard /wp-admin2,283 ▲1055.06 ▼0.5185.42 ▼11.0438.22 ▼5.16
Posts /wp-admin/edit.php2,188 ▲882.51 ▲0.5339.94 ▼2.7231.13 ▼4.30
Add New Post /wp-admin/post-new.php1,600 ▲7223.29 ▲0.39676.28 ▲1.7256.37 ▼4.44
Media Library /wp-admin/upload.php1,488 ▲884.84 ▲0.6395.28 ▲2.0841.14 ▼1.38
Import /wp-admin/edit.php?post_type=cs_chessgame&page=cs_import9392.0131.1729.86
Categories /wp-admin/edit-tags.php?taxonomy=cs_category&post_type=cs_chessgame1,3652.0830.7729.08
About /wp-admin/edit.php?post_type=cs_chessgame&page=cs_about9752.0028.0524.96
All Chessgames /wp-admin/edit.php?post_type=cs_chessgame1,2032.2337.2228.62
Settings /wp-admin/edit.php?post_type=cs_chessgame&page=cs_settings1,4932.1931.4624.03
Export /wp-admin/edit.php?post_type=cs_chessgame&page=cs_export9242.2329.5724.68
Tags /wp-admin/edit-tags.php?taxonomy=cs_tag&post_type=cs_chessgame1,3402.0832.8229.35
New Chessgame /wp-admin/post-new.php?post_type=cs_chessgame5,9169.14211.2680.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-chessgames
    • widget_recent-posts
    • widget_featured-chessgame
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_newest-chessgame
    • widget_search-chessgame

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 36× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/chessgame-shizzle/frontend/cs-ajax-mfen.php
    • > /wp-content/plugins/chessgame-shizzle/admin/cs-hooks.php
    • > /wp-content/plugins/chessgame-shizzle/admin/cs-meta-box-preview.php
    • > /wp-content/plugins/chessgame-shizzle/admin/cs-page-about.php
    • > /wp-content/plugins/chessgame-shizzle/functions/cs-pgn.php
    • > /wp-content/plugins/chessgame-shizzle/functions/cs-formatting.php
    • > /wp-content/plugins/chessgame-shizzle/admin/cs-page-export.php
    • > /wp-content/plugins/chessgame-shizzle/thirdparty/pgn4web/cs-preview-iframe.php
    • > /wp-content/plugins/chessgame-shizzle/admin/cs-page-import.php
    • > /wp-content/plugins/chessgame-shizzle/functions/cs-settings.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/chessgame-shizzle/frontend/widgets/cs-widget-newest-chessgame.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chessgame-shizzle/functions/cs-post-meta.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/chessgame-shizzle/frontend/widgets/cs-widget-search.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/chessgame-shizzle/frontend/widgets/cs-widget-featured-chessgame.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chessgame-shizzle/frontend/cs-shortcode-simple-list-search.php:104
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/chessgame-shizzle/chessgame-shizzle.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chessgame-shizzle/chessgame-shizzle-hooks.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/chessgame-shizzle/frontend/cs-shortcode-lessons.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/chessgame-shizzle/frontend/cs-shortcode-chessgame.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chessgame-shizzle/thirdparty/pgn4web/cs-pgn4web.php:29

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (Test...) image not found
The official readme.txt might help

chessgame-shizzle/chessgame-shizzle.php 85% from 13 tests

Analyzing the main PHP file in "Chessgame Shizzle" version 1.2.7
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/lang/")
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)

Code Analysis 97% from 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
There were no executable files found in this plugin15,653 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP631,6842,0128,604
JavaScript47892933,862
CSS42071792,108
SVG121212778
Markdown1210301
HTML1100

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity46.00
▷ Minimum class complexity1.00
▷ Maximum class complexity396.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods170
▷ Static methods21.18%
▷ Public methods12674.12%
▷ Protected methods00.00%
▷ Private methods4425.88%
Functions133
▷ Named functions133100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants415.38%
▷ Class constants2284.62%
▷ Public constants22100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
372 PNG files occupy 1.25MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
thirdparty/piecethemes/smart/102/wq.png7.00KB4.57KB▼ 34.79%
thirdparty/piecethemes/magnetic/178/wk.png1.82KB0.87KB▼ 52.39%
thirdparty/piecethemes/xboard/100/wk.png4.56KB2.68KB▼ 41.12%
thirdparty/piecethemes/uscf/80/bb.png2.72KB2.14KB▼ 21.45%
thirdparty/piecethemes/motif/168/wn.png1.50KB0.71KB▼ 52.19%