83% wopo-solitaire-web-based-game-online

Code Review | WoPo Solitaire

WordPress plugin WoPo Solitaire scored83%from 54 tests.

About plugin

  • Plugin page: wopo-solitaire-we...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Jun 25, 2021
  • Latest release: Jun 25, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by WoPo Solitaire
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.99 ▲0.63
Dashboard /wp-admin3.32 ▲0.0144.54 ▼2.69
Posts /wp-admin/edit.php3.37 ▲0.0142.53 ▼12.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.56 ▼13.50
Media Library /wp-admin/upload.php3.24 ▲0.0137.54 ▲1.23

Server storage [IO: ▲0.78MB] [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: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WoPo Solitaire
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.00 ▼0.731.74 ▼0.0843.73 ▲3.50
Dashboard /wp-admin2,198 ▲245.65 ▲0.1186.40 ▼0.8039.69 ▼0.22
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0433.72 ▼2.2734.63 ▲0.81
Add New Post /wp-admin/post-new.php1,526 ▼223.18 ▼0.06660.47 ▲25.8454.25 ▲3.97
Media Library /wp-admin/upload.php1,400 ▼34.12 ▼0.06107.74 ▲5.3948.84 ▲3.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 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/wopo-solitaire-web-based-game-online/wopo-solitaire.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: game, app, wopo, javascript, online...

wopo-solitaire-web-based-game-online/wopo-solitaire.php 62% from 13 tests

This is the main PHP file of "WoPo Solitaire" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("wopo-solitaire-web-based-game-online.php" instead of "wopo-solitaire.php")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.2.4" instead of "7.1")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "5.2")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected989 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript49584748
CSS3112164
PHP141439
HTML10031
Markdown1707

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.54MB with 0.30MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
html/screen-shot-win.png376.33KB84.07KB▼ 77.66%
html/src/spritesheet.png32.00KB30.50KB▼ 4.69%
html/screen-shot.png144.65KB24.96KB▼ 82.75%