84% woo-simple-gift-wrapping

Code Review | Woo Simple Gift Wrapping

WordPress plugin Woo Simple Gift Wrapping scored 84% from 54 tests.

About plugin

  • Plugin page: woo-simple-gift-w...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Oct 4, 2015
  • Latest release: Dec 23, 2015
  • Number of updates: 9
  • Update frequency: every 8.9 days
  • Top authors: lamlnq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,537 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.70ms] Passed 4 tests

A check of server-side resources used by Woo Simple Gift Wrapping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.72 ▼2.41
Dashboard /wp-admin3.31 ▲0.0047.40 ▼2.08
Posts /wp-admin/edit.php3.36 ▲0.0045.92 ▼3.06
Add New Post /wp-admin/post-new.php5.89 ▲0.00100.25 ▲15.52
Media Library /wp-admin/upload.php3.23 ▲0.0035.60 ▲4.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Woo Simple Gift Wrapping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.70 ▼1.051.68 ▼0.4843.29 ▼8.08
Dashboard /wp-admin2,206 ▲184.83 ▼0.05107.14 ▲3.7441.41 ▲1.89
Posts /wp-admin/edit.php2,092 ▲32.05 ▼0.0040.44 ▲5.1634.52 ▲2.93
Add New Post /wp-admin/post-new.php1,548 ▲1418.51 ▼4.70606.50 ▼38.8173.07 ▲14.41
Media Library /wp-admin/upload.php1,391 ▲64.18 ▲0.0195.05 ▼4.6241.53 ▼1.53

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-simple-gift-wrapping/woo-simple-gift-wrapping.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: woocommerce, gift wrapping

woo-simple-gift-wrapping/woo-simple-gift-wrapping.php Passed 13 tests

The main PHP script in "Woo Simple Gift Wrapping" version 1.1 is automatically included on every request by WordPress
70 characters long description:
Plugin help you add a gift card to checkout and can choose custom fee.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin377 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP11538268
CSS21067
JavaScript211231
HTML10011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin