90% gift-wrapping-for-woocommerce

Code Review | Gift Wrapping for WooCommerce

WordPress plugin Gift Wrapping for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: gift-wrapping-for...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2022
  • Latest release: Aug 14, 2023
  • Number of updates: 10
  • Update frequency: every 56.3 days
  • Top authors: pexlechris (80%)theogk (30%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /4,400 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.86ms] Passed 4 tests

This is a short check of server-side resources used by Gift Wrapping for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.94 ▲5.85
Dashboard /wp-admin3.33 ▲0.0343.96 ▼5.31
Posts /wp-admin/edit.php3.38 ▲0.0343.74 ▼6.29
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.54 ▲4.63
Media Library /wp-admin/upload.php3.25 ▲0.0234.52 ▼0.48

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gift Wrapping for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.77 ▲0.352.50 ▲0.0868.19 ▲24.67
Dashboard /wp-admin2,203 ▲125.79 ▲0.96102.85 ▲3.3039.85 ▲0.94
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0134.29 ▼2.5731.65 ▼6.05
Add New Post /wp-admin/post-new.php1,514 ▼1917.54 ▼5.62685.81 ▼6.4359.95 ▲4.55
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0394.99 ▼7.6942.45 ▼4.59

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: gift wrapping, packaging, woocommerce, wrapping, checkout...

gift-wrapping-for-woocommerce/gift-wrapping-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Gift Wrapping for WooCommerce" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
57 characters long description:
Allow customers to select a gift wrapper for their order.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin415 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12175564409
XML1005
SVG1001

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.27
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods2980.56%
▷ Protected methods25.56%
▷ Private methods513.89%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png24.59KB13.88KB▼ 43.57%
assets/icon-256x256.png9.86KB4.50KB▼ 54.35%
assets/screenshot-2.png12.15KB5.19KB▼ 57.23%
assets/banner-1544x500.png70.84KB31.16KB▼ 56.01%
assets/banner-772x250.png34.73KB13.74KB▼ 60.44%