84% bns-chesscom-badge

Code Review | BNS Chess.com Badge

WordPress plugin BNS Chess.com Badge scored84%from 54 tests.

About plugin

  • Plugin page: bns-chesscom-badge
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: May 15, 2010
  • Latest release: Apr 10, 2016
  • Number of updates: 21
  • Update frequency: every 102.7 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,864 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.33ms] Passed 4 tests

A check of server-side resources used by BNS Chess.com Badge
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.45 ▲3.47
Dashboard /wp-admin3.32 ▲0.0246.53 ▲1.43
Posts /wp-admin/edit.php3.37 ▲0.0144.84 ▲0.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.01 ▲2.80
Media Library /wp-admin/upload.php3.24 ▲0.0132.12 ▼3.16

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_bns-chesscom-badge
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by BNS Chess.com Badge
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.25 ▼0.752.11 ▲0.2344.18 ▲0.95
Dashboard /wp-admin2,206 ▲185.83 ▲0.0293.68 ▼5.8038.27 ▼5.49
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0235.62 ▲0.4532.41 ▼5.08
Add New Post /wp-admin/post-new.php1,542 ▲918.23 ▼5.00603.76 ▼34.9452.90 ▲4.30
Media Library /wp-admin/upload.php1,388 ▲34.15 ▼0.0394.46 ▼6.3239.73 ▼0.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_bns-chesscom-badge
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bns-chesscom-badge/bns-chesscom-badge.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: widget-only, shortcode, chesscom, dynamic ratings

bns-chesscom-badge/bns-chesscom-badge.php Passed 13 tests

The main PHP file in "BNS Chess.com Badge" ver. 0.8 adds more information about the plugin and also serves as the entry point for this plugin
99 characters long description:
Chess.com widget that dynamically displays the user's current rating with direct links to Chess.com

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
Everything looks great! No dangerous files found in this plugin279 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP187197272
CSS13337

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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 Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin