72% games

Code Review | Online Games

WordPress plugin Online Games scored72%from 54 tests.

About plugin

  • Plugin page: games
  • Plugin version: 2.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2015
  • Latest release: Nov 14, 2015
  • Number of updates: 60
  • Update frequency: every 5.0 days
  • Top authors: Critic Team (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

200+ active /34,784 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼10.43ms] Passed 4 tests

A check of server-side resources used by Online Games
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1937.89 ▼7.64
Dashboard /wp-admin3.35 ▲0.0435.00 ▼16.60
Posts /wp-admin/edit.php3.42 ▲0.0644.20 ▼3.68
Add New Post /wp-admin/post-new.php5.60 ▼0.2980.92 ▼13.80
Media Library /wp-admin/upload.php3.36 ▲0.1229.69 ▼2.62
Critic Games /wp-admin/options-general.php?page=critic-plugin-menu3.3333.17

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 106 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
Live_Scores_Options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Online Games
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.84 ▼0.767.31 ▲5.5843.78 ▲0.69
Dashboard /wp-admin2,237 ▲605.53 ▼0.1481.68 ▼13.0640.79 ▲0.65
Posts /wp-admin/edit.php2,145 ▲452.00 ▼0.0239.72 ▲4.2134.75 ▼0.51
Add New Post /wp-admin/post-new.php1,579 ▲4418.25 ▲0.05638.40 ▼0.5276.27 ▲14.72
Media Library /wp-admin/upload.php1,445 ▲484.20 ▲0.01101.34 ▼2.8446.83 ▼0.77
Critic Games /wp-admin/options-general.php?page=critic-plugin-menu2,1851.8424.63102.60

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • Live_Scores_Options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=critic-plugin-menu
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wgames_Main::show_admin_notice() should not be called statically

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/games/views/global-settings/page-header.php
    • > /wp-content/plugins/games/includes/admin-notice-helper/admin-notice-helper.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/games/games.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/games/includes/admin-notice-helper/admin-notice.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'wgames_Main' not found in wp-content/plugins/games/views/global-settings/page-notice.php:62
    • > PHP Notice
      Undefined variable: setting_logo_path in wp-content/plugins/games/views/global-settings/page-header.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/games/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'wgames_Module' not found in wp-content/plugins/games/classes/wgames-show.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'wgames_Module' not found in wp-content/plugins/games/classes/wgames-main.php:8

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

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 51 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Settings Games Page 1), #2 (Settings Games Page 2)
You can take inspiration from this readme.txt

games/games.php Passed 13 tests

"Online Games" version 2.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
140 characters long description:
Display up to 83 Free Flash Games in your website easily using unique short codes. Action,Adventure,Arcade,Skill,Sports Games & plenty more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,587 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP112741661,518
CSS23025
JavaScript16225
Markdown17019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods25
▷ Static methods1040.00%
▷ Public methods2184.00%
▷ Protected methods416.00%
▷ Private methods00.00%
Functions84
▷ Named functions8398.81%
▷ Anonymous functions11.19%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
56 PNG files occupy 0.29MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bmx-master.png10.47KB4.37KB▼ 58.27%
images/twisted-tennis.png4.43KB4.72KB0.00%
images/governor-of-poker-2.png5.23KB5.69KB0.00%
images/tom-and-jerry-spin-puzzle.png5.44KB5.58KB0.00%
img/logo/logo.png2.18KB1.07KB▼ 50.94%