89% order-tip-woo

Code Review | Order Tip for WooCommerce

WordPress plugin Order Tip for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: order-tip-woo
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 18, 2020
  • Latest release: Mar 27, 2023
  • Number of updates: 27
  • Update frequency: every 35.2 days
  • Top authors: railmedia (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

3,000+ active /12,804 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.01MB] [CPU: ▼4.39ms] Passed 4 tests

An overview of server-side resources used by Order Tip for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.46 ▼2.88
Dashboard /wp-admin3.31 ▲0.0147.65 ▼3.51
Posts /wp-admin/edit.php3.36 ▲0.0154.28 ▲2.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.09 ▼5.32
Media Library /wp-admin/upload.php3.23 ▲0.0132.89 ▼5.84

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Order Tip for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.19 ▼1.231.76 ▼0.1141.41 ▲1.40
Dashboard /wp-admin2,203 ▲215.84 ▼0.02104.36 ▼3.6839.06 ▼0.19
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0340.66 ▼0.7535.33 ▼0.84
Add New Post /wp-admin/post-new.php1,533 ▼022.99 ▼0.10641.89 ▼16.6659.46 ▲2.52
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.0397.46 ▼11.9746.24 ▼0.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: ecommerce, woocommerce, donation, tip, order

order-tip-woo/order-tip-for-woocommerce.php 85% from 13 tests

The primary PHP file in "Order Tip for WooCommerce" version 1.3.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("order-tip-woo.php" instead of "order-tip-for-woocommerce.php")
  • Requires at least: Required version must match the one declared in readme.txt ("3.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin5,694 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PO File76809192,162
CSS561821,657
PHP133142831,234
JavaScript4168101641

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity18.12
▷ Minimum class complexity2.00
▷ Maximum class complexity47.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/css/jqueryui-1.12.1/images/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%
admin/assets/css/jqueryui-1.12.1/images/ui-icons_777777_256x240.png6.94KB4.18KB▼ 39.78%
admin/assets/css/jqueryui-1.12.1/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
admin/assets/css/jqueryui-1.12.1/images/ui-icons_444444_256x240.png6.92KB4.18KB▼ 39.61%
admin/assets/css/jqueryui-1.12.1/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%