90% random-block

Code Review | Random

WordPress plugin Random scored90%from 54 tests.

About plugin

  • Plugin page: random-block
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 28, 2019
  • Latest release: May 28, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: chinteshprajapati (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.78ms] Passed 4 tests

Server-side resources used by Random
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.69 ▼0.15
Dashboard /wp-admin3.32 ▲0.0146.51 ▼5.18
Posts /wp-admin/edit.php3.38 ▲0.0349.30 ▲2.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.10 ▼7.97
Media Library /wp-admin/upload.php3.25 ▲0.0237.85 ▲5.31

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Random
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,162 ▲41626.18 ▲11.7851.08 ▲48.8443.24 ▼2.31
Dashboard /wp-admin2,290 ▲10211.81 ▲5.91139.83 ▲25.3644.67 ▲0.36
Posts /wp-admin/edit.php2,166 ▲7710.36 ▲8.3280.67 ▲45.2133.80 ▼1.30
Add New Post /wp-admin/post-new.php6,342 ▲4,82828.85 ▲11.27723.83 ▲41.9037.93 ▼12.97
Media Library /wp-admin/upload.php1,487 ▲9910.89 ▲6.65133.66 ▲37.6253.79 ▲12.17

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: random, random block

random-block/random.php 92% from 13 tests

Analyzing the main PHP file in "Random" version 1.0.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("random-block.php" instead of "random.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin724 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12130694
PHP121917
CSS10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin