77% embed-solitaire-iframe

Code Review | Solitaire Card Game - Embed Klondike Solitaire for Free - Ad-free Solitaire Puzzle game

WordPress plugin Solitaire Card Game - Embed Klondike Solitaire for Free - Ad-free Solitaire Puzzle game scored77%from 54 tests.

About plugin

  • Plugin page: embed-solitaire-i...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Mar 6, 2021
  • Latest release: Mar 23, 2021
  • Number of updates: 13
  • Update frequency: every 1.5 days
  • Top authors: onlinesolitaire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,143 total downloads

Benchmarks

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

An overview of server-side resources used by Solitaire Card Game - Embed Klondike Solitaire for Free - Ad-free Solitaire Puzzle game
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.87 ▲1.25
Dashboard /wp-admin3.31 ▲0.0046.15 ▼5.42
Posts /wp-admin/edit.php3.36 ▲0.0044.45 ▼6.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.69 ▼12.59
Media Library /wp-admin/upload.php3.23 ▲0.0035.92 ▼3.40

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Solitaire Card Game - Embed Klondike Solitaire for Free - Ad-free Solitaire Puzzle game
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.86 ▲0.322.10 ▲0.1644.11 ▼1.51
Dashboard /wp-admin2,218 ▲125.83 ▲0.97101.35 ▼2.0838.74 ▼8.02
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0233.57 ▼2.5635.06 ▼1.60
Add New Post /wp-admin/post-new.php1,555 ▲1418.37 ▼4.93603.89 ▼77.7653.97 ▼1.11
Media Library /wp-admin/upload.php1,397 ▼04.19 ▲0.00107.20 ▼8.7045.82 ▼2.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/embed-solitaire-iframe/embed-solitaire-turn-one-template.php
    • > /wp-content/plugins/embed-solitaire-iframe/embed-solitaire-template.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/embed-solitaire-iframe/embed-solitaire.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

embed-solitaire-iframe/embed-solitaire.php 77% from 13 tests

This is the main PHP file of "Solitaire Card Game - Embed Klondike Solitaire for Free - Ad-free Solitaire Puzzle game" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 87 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("embed-solitaire-iframe.php" instead of "embed-solitaire.php")
  • Description: The description should be shorter than 140 characters (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin37 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP351537

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected