83% shuffle

Code Review | Shuffle

WordPress plugin Shuffle scored83%from 54 tests.

About plugin

  • Plugin page: shuffle
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.3
  • WordPress version: 6.3.1
  • First release: Nov 15, 2010
  • Latest release: Jul 30, 2015
  • Number of updates: 27
  • Update frequency: every 63.6 days
  • Top authors: wonderboymusic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /8,692 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.40ms] Passed 4 tests

A check of server-side resources used by Shuffle
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0846.57 ▲6.03
Dashboard /wp-admin3.38 ▲0.0846.05 ▼4.63
Posts /wp-admin/edit.php3.49 ▲0.1450.56 ▲4.89
Add New Post /wp-admin/post-new.php5.98 ▲0.1084.23 ▲2.36
Media Library /wp-admin/upload.php3.30 ▲0.0836.46 ▼4.21
Shuffle /wp-admin/upload.php?page=shuffle-media3.2730.11

Server storage [IO: ▲0.17MB] [DB: ▲0.95MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Shuffle: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.63 ▼0.751.52 ▼0.2240.30 ▼6.83
Dashboard /wp-admin2,204 ▲164.98 ▼0.83109.14 ▼9.7138.30 ▼8.59
Posts /wp-admin/edit.php2,097 ▲82.20 ▲0.1838.70 ▲2.6334.41 ▲1.60
Add New Post /wp-admin/post-new.php1,520 ▲623.29 ▲5.80651.27 ▼9.3036.39 ▼26.02
Media Library /wp-admin/upload.php1,390 ▲24.29 ▲0.0896.88 ▼14.1441.44 ▼5.73
Shuffle /wp-admin/upload.php?page=shuffle-media7901.8127.9827.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • 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 | 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 following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shuffle/shuffle.php:459
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/shuffle/shuffle.php on line 10

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 90% from 29 tests

readme.txt 81% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === shuffle === )
  • Screenshots: These screenshots require images: #1 (In your Post library, rollover actions have added to conveniently point you to all of your item's attachments), #2 (You can now attach an attachment to ANYTHING, why not another attachment! Since all we are doing is setting post_parent, and attachments are Posts in the database, it is now easy to manage your associations. We also make sure you can't attach an attachment to itself :))
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can take inspiration from this readme.txt

shuffle/shuffle.php Passed 13 tests

The main PHP script in "Shuffle" version 0.5 is automatically included on every request by WordPress
25 characters long description:
Re-Order your attachments

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected480 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP18530380
JavaScript127594
CSS1205
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods15.26%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin