90% woocommerce-template-hints

Code Review | WooCommerce Template Hints

WordPress plugin WooCommerce Template Hints scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-templ...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5.3
  • WordPress version: 6.3.1
  • First release: Apr 9, 2015
  • Latest release: Jul 6, 2016
  • Number of updates: 6
  • Update frequency: every 81.0 days
  • Top authors: growdev (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

40+ active /9,133 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by WooCommerce Template Hints
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.65 ▼5.18
Dashboard /wp-admin3.31 ▲0.0154.39 ▼4.51
Posts /wp-admin/edit.php3.36 ▲0.0050.15 ▲1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.21 ▼2.48
Media Library /wp-admin/upload.php3.23 ▲0.0040.66 ▲5.53

Server storage [IO: ▲0.25MB] [DB: ▲0.31MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Template Hints
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.38 ▼0.261.70 ▼0.3541.23 ▼5.79
Dashboard /wp-admin2,201 ▲245.63 ▲0.0583.08 ▼18.5240.13 ▼6.61
Posts /wp-admin/edit.php2,106 ▲62.00 ▲0.0239.71 ▲3.9739.01 ▲1.59
Add New Post /wp-admin/post-new.php1,534 ▲823.12 ▲0.04658.51 ▼44.0352.53 ▲1.46
Media Library /wp-admin/upload.php1,406 ▲34.21 ▼0.01106.80 ▲1.3149.99 ▲3.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: woocommerce theme, design helper, woocommerce, ecommerce, woocommerce helper...

woocommerce-template-hints/woocommerce-template-hints.php Passed 13 tests

The primary PHP file in "WooCommerce Template Hints" version 1.0.0 is used by WordPress to initiate all plugin functionality
126 characters long description:
WooCommerce Template Hints adds a visual border around parts of all WooCommerce pages showing details about the template used.

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
No dangerous file extensions were detected65 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1316859
Markdown1406

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.38
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png111.62KB37.08KB▼ 66.78%
screenshot-2.png48.95KB16.54KB▼ 66.21%