90% wp-randomize

Code Review | WP Randomize - Advanced Random Categories & Posts Widget

WordPress plugin WP Randomize - Advanced Random Categories & Posts Widget scored90%from 54 tests.

About plugin

  • Plugin page: wp-randomize
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 6.3.1
  • First release: Sep 1, 2020
  • Latest release: Nov 18, 2020
  • Number of updates: 7
  • Update frequency: every 11.2 days
  • Top authors: wpvar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /612 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.09ms] Passed 4 tests

This is a short check of server-side resources used by WP Randomize - Advanced Random Categories & Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.09 ▲7.78
Dashboard /wp-admin3.37 ▲0.0645.24 ▼0.54
Posts /wp-admin/edit.php3.42 ▲0.0647.49 ▼1.68
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.98 ▼5.08
Media Library /wp-admin/upload.php3.29 ▲0.0640.61 ▲6.92

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_wp-randomize
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Randomize - Advanced Random Categories & Posts Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.77 ▲0.531.76 ▼0.1444.28 ▲1.39
Dashboard /wp-admin2,209 ▲214.82 ▼1.09100.53 ▼4.0943.75 ▲0.84
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0634.89 ▼6.2635.63 ▲1.04
Add New Post /wp-admin/post-new.php1,514 ▼1917.48 ▼5.91689.20 ▲96.2255.68 ▲4.97
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0295.80 ▼1.8742.55 ▼1.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_wp-randomize

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: random posts, widget, widgets, recent posts, post...

wp-randomize/wp-randomize.php Passed 13 tests

The primary PHP file in "WP Randomize - Advanced Random Categories & Posts Widget" version 1.0.0 is used by WordPress to initiate all plugin functionality
77 characters long description:
Adds advanced random categories & posts Widget which you can fully customize.

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
Success! There were no dangerous files found in this plugin227 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44725209
JavaScript14018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity12.50
▷ Minimum method complexity2.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.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
No PNG files were detected