83% wi-games-widget

Code Review | WI Games widget Plugin

WordPress plugin WI Games widget Plugin scored83%from 54 tests.

About plugin

  • Plugin page: wi-games-widget
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2015
  • Latest release: Jul 25, 2015
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: WI Games (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,341 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲1.38ms] Passed 4 tests

An overview of server-side resources used by WI Games widget Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0547.19 ▲4.59
Dashboard /wp-admin3.36 ▲0.0651.83 ▲2.54
Posts /wp-admin/edit.php3.48 ▲0.1253.31 ▼0.86
Add New Post /wp-admin/post-new.php5.94 ▲0.0696.58 ▲10.48
Media Library /wp-admin/upload.php3.29 ▲0.0638.66 ▼0.74

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WI Games widget Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲9213.22 ▼1.191.93 ▼0.0843.40 ▲0.04
Dashboard /wp-admin2,237 ▲314.86 ▼0.03106.77 ▼0.3972.06 ▲30.45
Posts /wp-admin/edit.php2,113 ▲101.97 ▼0.0540.62 ▲0.5637.53 ▼3.13
Add New Post /wp-admin/post-new.php1,543 ▲1123.34 ▲0.17763.74 ▲86.4552.10 ▼3.75
Media Library /wp-admin/upload.php1,410 ▲134.28 ▲0.01117.12 ▲0.1048.59 ▲2.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wi-games-widget/src/WIGames/Admin/Settings.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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:
  • Tags: You are using too many tags: 56 tag instead of maximum 10
  • Screenshots: A description for screenshot #1 is required in wi-games-widget/assets to your readme.txt
The official readme.txt is a good inspiration

wi-games-widget/plugin.php 92% from 13 tests

The main file in "WI Games widget Plugin" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wi-games-widget.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected306 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP456188257
PO File1274446
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.33
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/wigamesicon32.png1.55KB1.48KB▼ 4.17%