83% wopo-minesweeper

Code Review | WoPo Minesweeper

WordPress plugin WoPo Minesweeper scored83%from 54 tests.

About plugin

  • Plugin page: wopo-minesweeper
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 30, 2021
  • Latest release: Nov 21, 2023
  • Number of updates: 4
  • Update frequency: every 219.0 days
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /964 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.72ms] Passed 4 tests

Server-side resources used by WoPo Minesweeper
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.82 ▼6.65
Dashboard /wp-admin3.34 ▲0.0346.46 ▼8.94
Posts /wp-admin/edit.php3.39 ▲0.0344.83 ▼4.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.82 ▼10.80
Media Library /wp-admin/upload.php3.26 ▲0.0335.73 ▲2.07

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WoPo Minesweeper
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.67 ▲0.271.62 ▼0.0445.30 ▲1.48
Dashboard /wp-admin2,208 ▲305.62 ▼0.0892.01 ▼22.4841.17 ▼5.64
Posts /wp-admin/edit.php2,116 ▲192.03 ▲0.0638.95 ▲0.1835.65 ▲3.21
Add New Post /wp-admin/post-new.php1,541 ▲1523.37 ▼0.21618.71 ▼11.5645.67 ▼2.20
Media Library /wp-admin/upload.php1,413 ▲164.15 ▼0.1196.74 ▼1.8340.84 ▼1.32

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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wopo-minesweeper/wopo-minesweeper.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: javascript, game, html5, minesweeper, app...

wopo-minesweeper/wopo-minesweeper.php 77% from 13 tests

This is the main PHP file of "WoPo Minesweeper" version 1.2.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:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.2.4" instead of "7.1")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "5.2")

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 detected4,399 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript153385953,269
CSS55272959
PHP12367120
HTML10142
Markdown11009

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.18
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
html/app/img/sprite.png2.33KB1.25KB▼ 46.53%