89% woocommerce-photos-product-tab

Code Review | WooCommerce Photos Product Tab

WordPress plugin WooCommerce Photos Product Tab scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-photo...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2013
  • Latest release: Jun 13, 2013
  • Number of updates: 29
  • Update frequency: every 19.4 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /13,840 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by WooCommerce Photos Product Tab
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.39 ▲0.01
Dashboard /wp-admin3.35 ▲0.0047.61 ▼22.21
Posts /wp-admin/edit.php3.40 ▲0.0447.78 ▼5.77
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.58 ▼14.97
Media Library /wp-admin/upload.php3.27 ▲0.0435.62 ▲2.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Photos Product Tab
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼1.021.78 ▼0.0543.14 ▼1.30
Dashboard /wp-admin2,206 ▲185.90 ▲1.03106.08 ▼4.3038.46 ▼1.70
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0239.53 ▲1.2934.78 ▼3.69
Add New Post /wp-admin/post-new.php1,514 ▼517.73 ▼5.55613.08 ▼58.1149.26 ▼2.89
Media Library /wp-admin/upload.php1,385 ▼04.20 ▼0.02100.10 ▼2.0342.22 ▼2.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
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
Looking good! No server-side errors or output on direct access of PHP files

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Product Page with Photos in a new tab.), #2 (Disable the photos tab.), #3 (Photos Tab Settings.)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

woocommerce-photos-product-tab/woocommerce-photos-product-tab.php 85% from 13 tests

The main PHP script in "WooCommerce Photos Product Tab" version 2.1.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Requires at least: Required version does not match the one declared in readme.txt ("3.3" instead of "3.1")

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
No dangerous file extensions were detected352 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP13373192
PO File34698150
CSS12810

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
3 PNG files occupy 0.45MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png99.63KB41.11KB▼ 58.74%
screenshot-1.png361.60KB91.88KB▼ 74.59%
screenshot-3.png4.43KB3.64KB▼ 17.90%