78% woo-tuner

Code Review | Woo Tuner

WordPress plugin Woo Tuner scored78%from 54 tests.

About plugin

  • Plugin page: woo-tuner
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 1, 2016
  • Latest release: Aug 9, 2023
  • Number of updates: 33
  • Update frequency: every 74.9 days
  • Top authors: vol4ikman (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲3.00ms] Passed 4 tests

Server-side resources used by Woo Tuner
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1854.19 ▲6.91
Dashboard /wp-admin3.47 ▲0.1661.72 ▲5.66
Posts /wp-admin/edit.php3.59 ▲0.2256.99 ▲0.75
Add New Post /wp-admin/post-new.php6.07 ▲0.18114.82 ▼1.31
Media Library /wp-admin/upload.php3.40 ▲0.1651.50 ▲14.59
Order /wp-admin/admin.php?page=woo-tuner-order-widgets3.3640.19
WooTuner /wp-admin/admin.php?page=woo-tuner-settings3.3641.69

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
woo_tuner_version
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Woo Tuner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.47 ▼0.909.00 ▲7.1043.91 ▲5.59
Dashboard /wp-admin2,233 ▲565.91 ▲0.2688.20 ▼4.7939.07 ▼5.29
Posts /wp-admin/edit.php2,135 ▲382.07 ▲0.0537.25 ▼1.1833.22 ▼2.12
Add New Post /wp-admin/post-new.php1,557 ▲13423.19 ▲5.29678.01 ▲83.1751.14 ▲4.38
Media Library /wp-admin/upload.php1,438 ▲414.31 ▲0.11110.00 ▲15.7346.96 ▲6.04
Order /wp-admin/admin.php?page=woo-tuner-order-widgets9061.7225.8236.86
WooTuner /wp-admin/admin.php?page=woo-tuner-settings8311.7327.5431.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • woo_tuner_version
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-tuner/admin/partials/woo-tuner-admin-display.php
    • > /wp-content/plugins/woo-tuner/public/partials/woo-tuner-public-display.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=woo-tuner-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/woo-tuner/admin/js/woo-tuner-admin.js?ver=1.0.0:47:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=woo-tuner-settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).sortable is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Version format is invalid
You can take inspiration from this readme.txt

woo-tuner/woo-tuner.php Passed 13 tests

The main PHP script in "Woo Tuner" version 0.1.2 is automatically included on every request by WordPress
50 characters long description:
Customize your WooCommerce layouts with one click!

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
Everything looks great! No dangerous files found in this plugin1,040 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12165516711
CSS3423230
JavaScript3133199

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity21.43
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity5.47
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 compressed PNG files occupy 0.02MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/green@2x.png4.39KB3.10KB▼ 29.48%
admin/images/pattern-dark.png15.81KB17.46KB0.00%
admin/css/green.png2.14KB1.83KB▼ 14.55%