79% slide-puzzle

Code Review | Slide Puzzle

WordPress plugin Slide Puzzle scored79%from 54 tests.

About plugin

  • Plugin page: slide-puzzle
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.4.1
  • WordPress version: 6.3.1
  • First release: Jun 19, 2013
  • Latest release: Jul 24, 2013
  • Number of updates: 34
  • Update frequency: every 1.1 days
  • Top authors: colome (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.18ms] Passed 4 tests

An overview of server-side resources used by Slide Puzzle
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.98 ▼4.94
Dashboard /wp-admin3.31 ▲0.0149.27 ▲0.27
Posts /wp-admin/edit.php3.36 ▲0.0044.13 ▼6.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.45 ▼17.92
Media Library /wp-admin/upload.php3.23 ▲0.0037.33 ▲5.02
Slide Puzzle /wp-admin/options-general.php?page=sudoku-sliding3.1727.31

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Slide Puzzle: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.65 ▼1.007.74 ▲6.1543.68 ▲1.05
Dashboard /wp-admin2,196 ▲195.54 ▼0.1384.97 ▼11.2436.97 ▼10.14
Posts /wp-admin/edit.php2,086 ▼141.99 ▼0.0535.09 ▼6.6836.31 ▲0.81
Add New Post /wp-admin/post-new.php1,531 ▼423.10 ▲4.78680.24 ▲81.0259.70 ▼11.09
Media Library /wp-admin/upload.php1,407 ▲44.20 ▼0.00109.59 ▲5.3948.27 ▲4.61
Slide Puzzle /wp-admin/options-general.php?page=sudoku-sliding8801.9922.4929.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sudoku-sliding
    • > Notice in wp-content/plugins/slide-puzzle/slide-puzzle.php+217
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slide-puzzle/slide-puzzle.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: game, colome, sliding, slide puzzle, puzzle

slide-puzzle/slide-puzzle.php Passed 13 tests

"Slide Puzzle" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
99 characters long description:
Include a Sliding Puzzle in your blogs with just one shortcode. is Not flash!!, only html 5 and ccs

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin615 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13252340
PHP15948184
CSS112091

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.28
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/slide-puzzle-curdown.png0.69KB0.53KB▼ 22.90%
img/slide-puzzle-curup.png0.63KB0.50KB▼ 21.52%
img/slide-puzzle-curleft.png0.66KB0.56KB▼ 15.91%
img/slide-puzzle-curright.png0.70KB0.57KB▼ 18.72%
slide-puzzle.png38.60KB10.59KB▼ 72.56%