94% wha-wordsearch

Code Review | Word Search Puzzles game

WordPress plugin Word Search Puzzles game scored 94% from 54 tests.

About plugin

  • Plugin page: wha-wordsearch
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.7
  • WordPress version: 5.9.2
  • First release: Jan 14, 2019
  • Latest release: Apr 13, 2021
  • Number of updates: 44
  • Update frequency: every 18.7 days
  • Top authors: webhack (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active / 14,421 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.97MB] [CPU: ▼317.77ms] Passed 4 tests

A check of server-side resources used by Word Search Puzzles game
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1258.70 ▲9.06
Dashboard /wp-admin3.23 ▼0.1819.41 ▼13.84
Posts /wp-admin/edit.php3.68 ▲0.0436.67 ▼0.53
Add New Post /wp-admin/post-new.php3.26 ▼3.7127.67 ▼1,246.50
Media Library /wp-admin/upload.php3.25 ▼0.0518.48 ▼10.21
Settings /wp-admin/edit.php?post_type=wha_wordsearch&page=wha-wordsearch3.2218.90
Add New /wp-admin/post-new.php?post_type=wha_wordsearch3.2626.37
All wordsearch /wp-admin/edit.php?post_type=wha_wordsearch3.2720.60

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Word Search Puzzles game
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,207 ▲45318.26 ▲2.5233.86 ▲28.222.82 ▼0.22
Dashboard /wp-admin2,945 ▲846.04 ▼0.17116.67 ▼12.14155.04 ▼2.61
Posts /wp-admin/edit.php2,741 ▲473.26 ▲0.0266.16 ▲3.08141.56 ▲3.12
Add New Post /wp-admin/post-new.php1,696 ▲617.85 ▼0.99399.63 ▲8.43153.21 ▼5.52
Media Library /wp-admin/upload.php1,751 ▲565.56 ▲0.04125.48 ▼10.52186.76 ▼5.54
Settings /wp-admin/edit.php?post_type=wha_wordsearch&page=wha-wordsearch2,48910.20179.15198.16
Add New /wp-admin/post-new.php?post_type=wha_wordsearch3,3749.76171.96256.31
All wordsearch /wp-admin/edit.php?post_type=wha_wordsearch1,4273.1959.40113.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wha_wordsearch
    • > Notice in wp-content/plugins/wha-wordsearch/wha-wordsearch.php+66
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=wha_wordsearch
    • > Notice in wp-content/plugins/wha-wordsearch/wha-wordsearch.php+823
    Undefined index: myplugin_noncename

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: puzzles, search, crossword, game, wordsearch

wha-wordsearch/wha-wordsearch.php 85% from 13 tests

The main PHP file in "Word Search Puzzles game" ver. 2.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin8,675 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,679
CSS40132,330
Sass1434341,768
LESS1434441,758
JavaScript4083138
PHP2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.39MB with 0.26MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/image/screenshot-2.png174.06KB47.50KB▼ 72.71%
res/image/screenshot-3.png51.39KB22.11KB▼ 56.97%
res/image/screenshot-1.png123.99KB28.60KB▼ 76.93%
res/image/screenshot-4.png45.09KB17.54KB▼ 61.10%