83% random-user-notice

Code Review | Random User Notice

WordPress plugin Random User Notice scored83%from 54 tests.

About plugin

  • Plugin page: random-user-notice
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 1, 2017
  • Latest release: Jan 1, 2017
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: infodesignbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.90ms] Passed 4 tests

This is a short check of server-side resources used by Random User Notice
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.17 ▼3.43
Dashboard /wp-admin3.33 ▲0.0345.04 ▼4.82
Posts /wp-admin/edit.php3.38 ▲0.0248.04 ▲3.93
Add New Post /wp-admin/post-new.php5.93 ▲0.0478.25 ▼9.52
Media Library /wp-admin/upload.php3.25 ▲0.0234.24 ▲2.16
Random User Notice /wp-admin/options-general.php?page=random-user-notice3.2232.56

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Random User Notice
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.51 ▼1.057.06 ▲5.4440.29 ▼2.39
Dashboard /wp-admin2,224 ▲475.78 ▲0.1993.26 ▲6.9946.72 ▲7.48
Posts /wp-admin/edit.php2,131 ▲312.28 ▲0.2634.42 ▼3.0431.55 ▼1.27
Add New Post /wp-admin/post-new.php1,619 ▲8822.67 ▼0.39647.19 ▲3.2936.32 ▼14.77
Media Library /wp-admin/upload.php1,432 ▲324.51 ▲0.3496.43 ▼6.9045.01 ▼0.32
Random User Notice /wp-admin/options-general.php?page=random-user-notice9852.3544.7135.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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)
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > 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/random-user-notice/random-user-notice.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/random-user-notice/random-user-notice.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Random User Notice), #2 (Dashboard Appearnce after activating the plugin)
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

random-user-notice/random-user-notice.php 92% from 13 tests

This is the main PHP file of "Random User Notice" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 233 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected94 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1341691
JavaScript1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin