84% wpc-order-tip

Code Review | WPC Order Tip for WooCommerce

WordPress plugin WPC Order Tip for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wpc-order-tip
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 6, 2022
  • Latest release: Oct 5, 2023
  • Number of updates: 17
  • Update frequency: every 23.1 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,064 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.91ms] Passed 4 tests

This is a short check of server-side resources used by WPC Order Tip for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0934.60 ▼9.13
Dashboard /wp-admin3.39 ▲0.0846.58 ▲0.96
Posts /wp-admin/edit.php3.50 ▲0.1451.87 ▼2.15
Add New Post /wp-admin/post-new.php5.99 ▲0.1098.28 ▲2.78
Media Library /wp-admin/upload.php3.31 ▲0.0836.91 ▲2.70
About /wp-admin/admin.php?page=wpclever3.2830.27
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.2828.26

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

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

Browser metrics Passed 4 tests

WPC Order Tip for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲12013.17 ▼1.211.64 ▼0.4440.01 ▼6.06
Dashboard /wp-admin2,280 ▲955.85 ▲0.0299.73 ▼3.5980.75 ▲37.36
Posts /wp-admin/edit.php2,169 ▲772.05 ▲0.0436.87 ▼1.5134.45 ▲0.63
Add New Post /wp-admin/post-new.php1,751 ▲21824.73 ▲1.45670.24 ▼16.7655.74 ▼0.95
Media Library /wp-admin/upload.php1,465 ▲774.16 ▼0.10101.00 ▼5.6144.93 ▼0.79
About /wp-admin/admin.php?page=wpclever1,3962.1539.0335.76
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7272.2832.8354.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpc-order-tip/wpc-order-tip.php:19

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: tips, donee, wpc, woocommerce, order...

wpc-order-tip/wpc-order-tip.php 92% from 13 tests

The primary PHP file in "WPC Order Tip for WooCommerce" version 2.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 218 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,532 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP9220361,541
CSS62701481,267
Sass2620361
JavaScript5629330
SVG20033

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity23.62
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods58
▷ Static methods712.07%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants9
▷ Global constants9100.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 files were detected