84% woocommerce-user-shortcode

Code Review | Display WooCommerce User Info

WordPress plugin Display WooCommerce User Info scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-user-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2015
  • Latest release: Mar 16, 2015
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: richymilo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,277 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.34ms] Passed 4 tests

An overview of server-side resources used by Display WooCommerce User Info
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.57 ▲2.13
Dashboard /wp-admin3.31 ▲0.0050.29 ▼0.72
Posts /wp-admin/edit.php3.36 ▲0.0045.13 ▼2.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.93 ▼16.41
Media Library /wp-admin/upload.php3.23 ▲0.0042.17 ▲4.67

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Display WooCommerce User Info
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.81 ▼0.0244.25 ▲2.26
Dashboard /wp-admin2,192 ▲125.50 ▼0.1786.03 ▼7.2439.31 ▼7.33
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0535.35 ▼2.7039.20 ▲3.31
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▲0.27664.47 ▼5.3953.84 ▲2.41
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.06107.10 ▲6.1847.06 ▲0.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/woocommerce-user-shortcode/woocommerce-user-shortcode.php:45

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: shipping info, woocommerce, shortcodes, woo, billing info

woocommerce-user-shortcode/woocommerce-user-shortcode.php Passed 13 tests

"Display WooCommerce User Info" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
91 characters long description:
Displays formatted copy of Woo Commerce Shipping and/or Billing information in a shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15967

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin