89% stephino-rpg

Code Review | Stephino RPG (Game)

WordPress plugin Stephino RPG (Game) scored 89% from 54 tests.

About plugin

  • Plugin page: stephino-rpg
  • Plugin version: 0.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.8.1
  • First release: Aug 12, 2020
  • Latest release: Aug 18, 2021
  • Number of updates: 72
  • Update frequency: every 5.2 days
  • Top authors: stephino (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 4,416 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.77MB] [CPU: ▼142.62ms] Passed 4 tests

Analyzing server-side resources used by Stephino RPG (Game)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.9744.02 ▲13.99
Dashboard /wp-admin3.96 ▲0.9051.63 ▲4.37
Posts /wp-admin/edit.php4.01 ▲0.4145.92 ▼10.17
Add New Post /wp-admin/post-new.php6.32 ▲0.88100.23 ▼564.28
Media Library /wp-admin/upload.php3.90 ▲0.8937.85 ▼0.38
Themes /wp-admin/admin.php?page=stephino-rpg-themes4.0937.42
Game Mechanics 🔒 /wp-admin/admin.php?page=stephino-rpg-options4.0935.44
Play Mors /wp-admin/admin.php?page=stephino-rpg4.1232.37
Dashboard /wp-admin/admin.php?page=stephino-rpg-dashboard4.1542.39

Server storage [IO: ▲15.61MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 465 new files
Database: 11 new tables, 1 new option
New tables
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Stephino RPG (Game)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,882 ▲30015.86 ▲0.4910.12 ▲0.9444.12 ▼8.18
Dashboard /wp-admin3,134 ▲2005.97 ▼0.03146.41 ▼11.14145.12 ▲26.25
Posts /wp-admin/edit.php2,932 ▲1932.76 ▲0.0563.58 ▼7.2188.68 ▲7.25
Add New Post /wp-admin/post-new.php4,000 ▲2,12820.64 ▲1.46471.34 ▼6.07128.55 ▲13.72
Media Library /wp-admin/upload.php1,926 ▲1165.02 ▼0.02164.02 ▼10.21152.35 ▲37.50
Themes /wp-admin/admin.php?page=stephino-rpg-themes1,7292.5862.71202.17
Game Mechanics 🔒 /wp-admin/admin.php?page=stephino-rpg-options9,9094.92188.07158.96
Play Mors /wp-admin/admin.php?page=stephino-rpg3,3555.05188.36228.17
Dashboard /wp-admin/admin.php?page=stephino-rpg-dashboard2,4685.62205.74181.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stephino-rpg-dashboard
    • > POST request to /wp-admin/admin-ajax.php?action=stephino_rpg
    • > Notice in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Renderer.php+46
    ob_end_clean(): failed to delete buffer. No buffer to delete

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 take a closer look at the following
  • 95× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Config_Item_Collection' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Config/PremiumModifiers.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Config_Item_Collection' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Config/Units.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Renderer_Ajax_Dialog' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Renderer/Ajax/Dialog/Entity.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Config_Item_Single' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Config/PremiumModifier.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Renderer_Ajax_Action' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Renderer/Ajax/Action/Attack.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Config_Item_Collection' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Config/Tutorials.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Config_Item_Collection' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Config/Buildings.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Db_Model' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Db/Model/Invoices.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Config_Item_Single' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Config/Building.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stephino_Rpg_Config_Item_Single' not found in wp-content/plugins/stephino-rpg/lib/Stephino/Rpg/Config/Ship.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: game, platformer, competition, games, gutenberg...

stephino-rpg/stephino-rpg.php Passed 13 tests

The main PHP script in "Stephino RPG (Game)" version 0.4.2 is automatically included on every request by WordPress
102 characters long description:
Host a stunning browser-based multiplayer RPG (Role-Playing Game) for the first time ever on WordPress

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
Good job! No executable or dangerous file extensions detected41,487 lines of code in 319 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity35.67
▷ Minimum class complexity1.00
▷ Maximum class complexity535.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
▷ Abstract classes53.52%
▷ Concrete classes13796.48%
▷ Final classes21.46%
▷ Static methods35321.71%
▷ Public methods1,39485.73%
▷ Protected methods23014.15%
▷ Private methods20.12%
▷ Named functions00.00%
▷ Anonymous functions116100.00%
▷ Global constants20.21%
▷ Class constants95999.79%
▷ Public constants959100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
114 compressed PNG files occupy 4.49MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings