84% image-puzzle

Code Review | Image Puzzle

WordPress plugin Image Puzzle scored84%from 54 tests.

About plugin

  • Plugin page: image-puzzle
  • Plugin version: 1.04
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: Jul 31, 2023
  • Number of updates: 23
  • Update frequency: every 96.6 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,167 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.23ms] Passed 4 tests

A check of server-side resources used by Image Puzzle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.88 ▼6.01
Dashboard /wp-admin3.33 ▲0.0358.76 ▲4.69
Posts /wp-admin/edit.php3.45 ▲0.1060.12 ▲3.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.53 ▼29.75
Media Library /wp-admin/upload.php3.24 ▲0.0143.91 ▲3.27

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

Browser metrics Passed 4 tests

Image Puzzle: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17814.45 ▼0.301.75 ▲0.0543.54 ▼0.31
Dashboard /wp-admin2,330 ▲1566.18 ▲0.61122.26 ▲35.2488.48 ▲44.29
Posts /wp-admin/edit.php2,273 ▲1703.55 ▲1.5653.08 ▲14.8368.64 ▲31.98
Add New Post /wp-admin/post-new.php1,691 ▲16522.16 ▲4.67556.94 ▼167.1227.87 ▼31.11
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.1099.36 ▼6.0986.59 ▲38.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Everything seems fine, however this is by no means 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-puzzle/image-puzzle.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: animation, picture, nice, puzzle, transition...

image-puzzle/image-puzzle.php 85% from 13 tests

The main PHP file in "Image Puzzle" ver. 1.04 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin196 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP38123182
CSS12014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions6
▷ Named functions6100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png0.95KB0.94KB▼ 1.03%
images/fb.png1.59KB1.00KB▼ 37.42%
pro.png14.85KB5.82KB▼ 60.84%