84% randi

Code Review | Randi

WordPress plugin Randi scored 84% from 54 tests.

About plugin

  • Plugin page: randi
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5.0
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Apr 4, 2016
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: henry.wright (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.15MB] [CPU: ▼11.79ms] Passed 4 tests

An overview of server-side resources used by Randi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.63 ▼5.11
Dashboard /wp-admin3.25 ▼0.0639.51 ▼6.13
Posts /wp-admin/edit.php3.37 ▲0.0147.47 ▼17.16
Add New Post /wp-admin/post-new.php5.31 ▼0.5871.42 ▼18.74
Media Library /wp-admin/upload.php3.24 ▲0.0136.67 ▲2.89

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Randi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.62 ▼0.2040.09 ▼10.27
Dashboard /wp-admin2,209 ▲215.85 ▲0.95114.06 ▼0.5041.66 ▼5.36
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0440.40 ▼1.2836.54 ▼0.18
Add New Post /wp-admin/post-new.php1,534 ▲1023.23 ▼0.32685.48 ▲81.5048.95 ▼1.55
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.01103.19 ▼9.4442.55 ▲0.13

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/import.php): failed to open stream: No such file or directory in wp-content/plugins/randi/randi.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/import.php' (include_path='.:/usr/share/php') in wp-content/plugins/randi/randi.php on line 22
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/randi/randi.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Randi\\add_action() in wp-content/plugins/randi/php/actions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Randi\\add_filter() in wp-content/plugins/randi/php/filters.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: users

randi/randi.php Passed 13 tests

The main PHP file in "Randi" ver. 0.2.0 adds more information about the plugin and also serves as the entry point for this plugin
43 characters long description:
Fill your WordPress site with random users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin225 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP658197225

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.50
▷ Minimum class complexity3.00
▷ Maximum class complexity14.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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