90% wpc-shop-as-customer

Code Review | WPC Shop as a Customer for WooCommerce

WordPress plugin WPC Shop as a Customer for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-shop-as-customer
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 20, 2021
  • Latest release: Sep 5, 2023
  • Number of updates: 15
  • Update frequency: every 51.9 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,139 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WPC Shop as a Customer for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.18 ▼1.33
Dashboard /wp-admin3.32 ▲0.0252.87 ▲2.34
Posts /wp-admin/edit.php3.44 ▲0.0846.22 ▲0.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0479.50 ▼5.83
Media Library /wp-admin/upload.php3.25 ▲0.0232.82 ▼2.00
About /wp-admin/admin.php?page=wpclever3.2129.97
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.2130.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WPC Shop as a Customer for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13014.35 ▼0.182.12 ▲0.3543.70 ▼1.73
Dashboard /wp-admin2,260 ▲865.62 ▲0.0184.50 ▼14.2973.45 ▲28.92
Posts /wp-admin/edit.php2,181 ▲842.04 ▲0.0334.77 ▲1.4034.06 ▼2.88
Add New Post /wp-admin/post-new.php1,604 ▲7623.28 ▼0.04742.14 ▲57.1961.68 ▲1.89
Media Library /wp-admin/upload.php1,477 ▲774.18 ▼0.0095.64 ▼6.7878.98 ▲35.17
About /wp-admin/admin.php?page=wpclever1,4082.1431.0834.32
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7322.1632.4060.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 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 were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: Please take inspiration from this readme.txt

wpc-shop-as-customer/wpc-shop-as-customer.php Passed 13 tests

The entry point to "WPC Shop as a Customer for WooCommerce" version 1.2.3 is a PHP file that has certain tags in its header comment area
90 characters long description:
WPC Shop as a Customer allows store administrators to login as a customer on the frontend.

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
Everything looks great! No dangerous files found in this plugin1,510 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP413128785
CSS3966563
JavaScript3232126
SVG20036

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity26.00
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin