83% generate-random-us-address

Code Review | Random Address

WordPress plugin Random Address scored 83% from 54 tests.

About plugin

  • Plugin page: generate-random-u...
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.1
  • WordPress version: 5.8.1
  • First release: May 4, 2016
  • Latest release: May 6, 2016
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: michaelcanan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Random Address
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.28 ▲13.11
Dashboard /wp-admin3.07 ▲0.0251.79 ▲4.14
Posts /wp-admin/edit.php3.12 ▲0.0242.46 ▼2.97
Add New Post /wp-admin/post-new.php5.43 ▼0.0090.48 ▼556.01
Media Library /wp-admin/upload.php3.01 ▲0.0129.92 ▼9.13

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
randomaddress_filesize

Browser metrics Passed 4 tests

A check of browser resources used by Random Address
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲9315.90 ▼0.0011.63 ▲3.3247.46 ▼2.46
Dashboard /wp-admin2,984 ▲505.91 ▼0.06169.22 ▲17.55101.56 ▼13.58
Posts /wp-admin/edit.php2,756 ▲172.72 ▼0.0064.30 ▼1.7597.25 ▲11.67
Add New Post /wp-admin/post-new.php1,685 ▲218.90 ▲0.16408.27 ▲17.01125.47 ▲12.95
Media Library /wp-admin/upload.php1,827 ▲205.04 ▲0.02147.88 ▼4.33118.07 ▲1.16

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
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • randomaddress_filesize

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/generate-random-us-address/randomaddress.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #0, #0 in generate-random-us-address/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === generate-random-us-address === )
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

generate-random-us-address/randomaddress.php 92% from 13 tests

The entry point to "Random Address" version 2.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("generate-random-us-address.php" instead of "randomaddress.php")

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
Everything looks great! No dangerous files found in this plugin210 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11827210

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected