83% memory-game

Code Review | Memory Game (Memorama)

WordPress plugin Memory Game (Memorama) scored 83% from 54 tests.

About plugin

  • Plugin page: memory-game
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-1.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2012
  • Latest release: May 6, 2013
  • Number of updates: 7
  • Update frequency: every 18.1 days
  • Top authors: oscaruh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 6,566 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼6.57ms] Passed 4 tests

Server-side resources used by Memory Game (Memorama)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.23 ▼1.14
Dashboard /wp-admin3.33 ▲0.0348.34 ▲0.03
Posts /wp-admin/edit.php3.38 ▲0.0345.42 ▼6.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.69 ▼16.14
Media Library /wp-admin/upload.php3.26 ▲0.0332.45 ▼2.00
Memory Game /wp-admin/edit.php?post_type=memorygame3.3034.75
New Imagen /wp-admin/post-new.php?post_type=memorygame3.3146.43

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Memory Game (Memorama)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲18813.52 ▼1.235.71 ▲3.9345.38 ▲1.17
Dashboard /wp-admin2,230 ▲555.87 ▼0.03103.34 ▼18.4642.80 ▼2.64
Posts /wp-admin/edit.php2,116 ▲272.04 ▼0.0234.11 ▲0.5934.34 ▲0.18
Add New Post /wp-admin/post-new.php1,552 ▲3318.26 ▼5.21597.17 ▼86.7755.99 ▲0.36
Media Library /wp-admin/upload.php1,415 ▲274.21 ▼0.0595.74 ▼2.2444.56 ▲0.52
Memory Game /wp-admin/edit.php?post_type=memorygame1,0771.9831.2529.44
New Imagen /wp-admin/post-new.php?post_type=memorygame1,6183.9865.5334.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× 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/memory-game/memorygame.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === memory-game === )
  • Screenshots: Please add an image for screenshot #1 (Selecciona las imagenes para mostrar en el juego memorama , select to image to use Memory game)
The official readme.txt might help

memory-game/memorygame.php 92% from 13 tests

The principal PHP file in "Memory Game (Memorama)" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("memory-game.php" instead of "memorygame.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin211 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1201884
JavaScript121380
CSS12047

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.66MB with 0.50MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png674.91KB161.48KB▼ 76.07%