78% retro-game-emulator

Code Review | Retro Game Emulator

WordPress plugin Retro Game Emulator scored 78% from 54 tests.

About plugin

  • Plugin page: retro-game-emulator
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 6.3.1
  • First release: Mar 6, 2016
  • Latest release: Jan 3, 2021
  • Number of updates: 11
  • Update frequency: every 160.8 days
  • Top authors: grimmdude (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active / 15,615 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Retro Game Emulator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.29 ▼2.49
Dashboard /wp-admin3.32 ▲0.0147.96 ▼1.29
Posts /wp-admin/edit.php3.37 ▲0.0144.60 ▲0.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.85 ▼6.84
Media Library /wp-admin/upload.php3.24 ▲0.0137.13 ▲3.59
Retro Game Emulator /wp-admin/options-general.php?page=retro-game-emulator3.2430.33

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Retro Game Emulator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7315.40 ▲1.0314.75 ▲13.1041.32 ▼0.26
Dashboard /wp-admin2,207 ▲165.86 ▲0.97100.73 ▼2.8141.99 ▼0.80
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0533.55 ▼1.7334.16 ▲1.37
Add New Post /wp-admin/post-new.php1,545 ▲1718.31 ▼4.80586.46 ▼93.6751.17 ▼9.85
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0197.52 ▼13.9840.82 ▼8.44
Retro Game Emulator /wp-admin/options-general.php?page=retro-game-emulator8142.0523.7535.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/retro-game-emulator/retro-game-emulator.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: romsArray in wp-content/plugins/retro-game-emulator/shortcode-template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/retro-game-emulator/options.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/retro-game-emulator/shortcode-template.php:8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/retro-game-emulator/shortcode-template.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Screenshot of player.) image not found
You can take inspiration from this readme.txt

retro-game-emulator/retro-game-emulator.php 92% from 13 tests

"Retro Game Emulator" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected296 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32823176
JavaScript2256120

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity4.00
▷ Minimum method complexity4.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.18MB with 0.13MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png184.01KB48.85KB▼ 73.45%