90% shop-as-client

Code Review | Shop as Client for WooCommerce

WordPress plugin Shop as Client for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: shop-as-client
  • Plugin version: 2.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Feb 7, 2018
  • Latest release: Nov 27, 2023
  • Number of updates: 80
  • Update frequency: every 26.5 days
  • Top authors: webdados (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

900+ active /19,700 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.05MB] [CPU: ▼4.66ms] Passed 4 tests

An overview of server-side resources used by Shop as Client for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.96 ▼5.25
Dashboard /wp-admin3.36 ▲0.0643.39 ▼7.26
Posts /wp-admin/edit.php3.41 ▲0.0546.48 ▲1.48
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.06 ▼7.61
Media Library /wp-admin/upload.php3.28 ▲0.0536.48 ▲3.07

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Shop as Client for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.37 ▲0.121.93 ▲0.1937.36 ▼7.58
Dashboard /wp-admin2,192 ▲125.62 ▼0.0491.90 ▼1.2737.80 ▼4.95
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0040.12 ▲1.7936.46 ▼0.65
Add New Post /wp-admin/post-new.php1,526 ▼323.20 ▲0.21595.83 ▼42.2255.89 ▼1.57
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0495.95 ▼3.4242.56 ▲2.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: ecommerce, woocommerce, customer, checkout, client...

shop-as-client/shop-as-client.php 92% from 13 tests

The main PHP script in "Shop as Client for WooCommerce" version 2.7 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 166 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
Everything looks great! No dangerous files found in this plugin316 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32453297
JavaScript17019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
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%
Functions21
▷ Named functions1780.95%
▷ Anonymous functions419.05%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
simple_order_approval_nag/simple-woocommerce-order-approval-logo.png2.56KB1.68KB▼ 34.29%