68% football-game-by-kashan-shah

Code Review | Football Game By Kashan Shah

WordPress plugin Football Game By Kashan Shah scored68%from 54 tests.

About plugin

  • Plugin page: football-game-by-...
  • Plugin version: 0.0.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: May 24, 2018
  • Latest release: May 24, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kashanshah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,478 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼35.59ms] Passed 4 tests

This is a short check of server-side resources used by Football Game By Kashan Shah
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.11 ▼5.57
Dashboard /wp-admin2.99 ▼0.3121.76 ▼34.34
Posts /wp-admin/edit.php2.99 ▼0.3624.03 ▼26.45
Add New Post /wp-admin/post-new.php2.99 ▼2.8924.31 ▼67.49
Media Library /wp-admin/upload.php2.99 ▼0.2422.65 ▼14.09
Football Game By Kashan Shah /wp-admin/options-general.php?page=football-game-by-kashanshah2.9924.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Football Game By Kashan Shah
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.051.76 ▼0.2042.82 ▼0.22
Dashboard /wp-admin2,196 ▲165.63 ▼0.0288.16 ▼0.7438.47 ▼2.46
Posts /wp-admin/edit.php2,107 ▲72.01 ▼0.0238.58 ▲0.4934.70 ▼0.97
Add New Post /wp-admin/post-new.php1,529 ▲123.19 ▼0.11607.28 ▼75.5154.20 ▼0.88
Media Library /wp-admin/upload.php1,401 ▲44.21 ▲0.0199.15 ▼5.0343.43 ▼0.25
Football Game By Kashan Shah /wp-admin/options-general.php?page=football-game-by-kashanshah7902.0224.8143.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=football-game-by-kashanshah
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/football-game-by-kashan-shah/football-game-by-kashanshah.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/football-game-by-kashan-shah/admin_view.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Activate the plugin), #2 (Go to plugin page to copy the shortcode), #3 (Copy the shortcode), #4 (Paste the shortcode in to the post), #5 (The game will appear in the post.)
The official readme.txt is a good inspiration

football-game-by-kashan-shah/football-game-by-kashanshah.php 85% from 13 tests

This is the main PHP file of "Football Game By Kashan Shah" version 0.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("football-game-by-kashan-shah.php" instead of "football-game-by-kashanshah.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin195 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS10191
PHP35959
Markdown112029
JavaScript11016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/football.png5.04KB2.92KB▼ 41.96%