83% wp-search-username

Code Review | WP Search Username

WordPress plugin WP Search Username scored83%from 54 tests.

About plugin

  • Plugin page: wp-search-username
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: Mar 12, 2018
  • Latest release: Mar 13, 2018
  • Number of updates: 16
  • Update frequency: every 0.2 days
  • Top authors: iWebWebdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.57MB] [CPU: ▼24.96ms] Passed 4 tests

Server-side resources used by WP Search Username
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6821.38 ▼20.43
Dashboard /wp-admin3.21 ▼0.0934.10 ▼11.48
Posts /wp-admin/edit.php3.14 ▼0.2226.42 ▼19.77
Add New Post /wp-admin/post-new.php4.61 ▼1.2842.20 ▼48.15
Media Library /wp-admin/upload.php3.24 ▲0.0136.03 ▲3.88

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_wpsu_searchusername_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Search Username
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.88 ▲0.0943.70 ▼3.12
Dashboard /wp-admin2,206 ▲184.85 ▼0.0698.63 ▼9.5540.81 ▼0.99
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0539.70 ▲1.7834.74 ▲1.33
Add New Post /wp-admin/post-new.php1,536 ▲323.08 ▼0.01651.28 ▼33.6166.53 ▲3.44
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0198.62 ▼9.2944.09 ▼3.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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_wpsu_searchusername_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-search-username/author.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-search-username/wp-search-username.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in wp-search-username/assets to your readme.txt
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

wp-search-username/wp-search-username.php 92% from 13 tests

The main file in "WP Search Username" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Success! There were no dangerous files found in this plugin107 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24824107

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.41MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png74.05KB28.84KB▼ 61.05%
assets/screenshot-3.png135.88KB49.74KB▼ 63.39%
assets/screenshot-4.png29.22KB11.97KB▼ 59.04%
assets/screenshot-5.png95.48KB36.72KB▼ 61.54%
assets/screenshot-1.png88.73KB34.46KB▼ 61.16%