88% image-shuffle

Code Review | Image Shuffle

WordPress plugin Image Shuffle scored 88% from 54 tests.

About plugin

  • Plugin page: image-shuffle
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 5.8.1
  • First release: Jan 8, 2018
  • Latest release: Feb 1, 2018
  • Number of updates: 10
  • Update frequency: every 2.7 days
  • Top authors: jnrana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 590 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼139.90ms] Passed 4 tests

A check of server-side resources used by Image Shuffle
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.77 ▲0.0527.72 ▲6.38
Dashboard /wp-admin3.11 ▲0.0545.66 ▼1.81
Posts /wp-admin/edit.php3.22 ▲0.1145.35 ▲2.48
Add New Post /wp-admin/post-new.php5.47 ▲0.0495.53 ▼552.94
Media Library /wp-admin/upload.php3.05 ▲0.0435.51 ▼7.34

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Image Shuffle
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,806 ▲21016.37 ▲0.4613.88 ▲4.1647.91 ▲0.42
Dashboard /wp-admin2,973 ▲426.16 ▲0.24146.81 ▲3.09108.35 ▲10.04
Posts /wp-admin/edit.php2,745 ▲62.72 ▲0.0061.28 ▼3.6586.55 ▲4.57
Add New Post /wp-admin/post-new.php1,689 ▲1718.42 ▼0.54401.79 ▲12.49111.39 ▼2.94
Media Library /wp-admin/upload.php1,816 ▲95.02 ▼0.02153.00 ▼3.64114.42 ▼1.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/image-shuffle/public/partials/essco-image-shuffle-public-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/image-shuffle/admin/partials/essco-image-shuffle-admin-display.php:1
    • > PHP Notice
      Undefined variable: images in wp-content/plugins/image-shuffle/public/partials/shuffle-images.php on line 1

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Easy pop up to add ShortCode to WP-Editor.), #2 (Button to Add the Shuffle ShortCode to WP-Editor.)
You can take inspiration from this readme.txt

image-shuffle/essco-image-shuffle.php 85% from 13 tests

Analyzing the main PHP file in "Image Shuffle" version 1.0.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("image-shuffle.php" instead of "essco-image-shuffle.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,565 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.71
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ 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
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
admin/js/shuffle-icon.png3.91KB2.97KB▼ 24.06%