73% go-board-sgf-viewer

Code Review | Go Board SGF Viewer

WordPress plugin Go Board SGF Viewer scored73%from 54 tests.

About plugin

  • Plugin page: go-board-sgf-viewer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.2
  • WordPress version: 6.3.1
  • First release: Feb 1, 2018
  • Latest release: Feb 2, 2018
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: passerines (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼50.71ms] Passed 4 tests

Analyzing server-side resources used by Go Board SGF Viewer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.34 ▼32.35
Dashboard /wp-admin2.07 ▼1.235.12 ▼40.79
Posts /wp-admin/edit.php2.07 ▼1.286.15 ▼42.85
Add New Post /wp-admin/post-new.php2.07 ▼3.815.71 ▼85.75
Media Library /wp-admin/upload.php2.07 ▼1.165.18 ▼33.45

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

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

Browser metrics Passed 4 tests

Go Board SGF Viewer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10313.34 ▼1.102.10 ▲0.3538.65 ▼3.16
Dashboard /wp-admin2,214 ▲235.05 ▼1.03108.04 ▲7.3440.67 ▼0.40
Posts /wp-admin/edit.php2,097 ▲82.01 ▲0.0035.84 ▼7.2136.09 ▼2.22
Add New Post /wp-admin/post-new.php1,522 ▲323.41 ▲0.05660.35 ▲3.8168.30 ▲10.93
Media Library /wp-admin/upload.php1,399 ▲144.30 ▲0.0895.86 ▼7.9746.13 ▲0.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the igop_sgf_viewer_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/go-board-sgf-viewer/igop.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (A Go-board in the articles), #2 (You can change the board appearance)
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

go-board-sgf-viewer/igop.php 92% from 13 tests

The main file in "Go Board SGF Viewer" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("go-board-sgf-viewer.php" instead of "igop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin17,036 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
CSS88881219,042
SVG1002,671
Sass1434341,768
LESS1434441,758
JavaScript35105391,753
PHP191626
HTML19018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 2.54MB with 1.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/board/goban.png2,112.23KB1,694.34KB▼ 19.78%
screenshot-1.png426.75KB265.81KB▼ 37.71%
screenshot-2.png58.39KB13.80KB▼ 76.37%