89% category-and-product-woocommerce-tabs

Code Review | Category and Product Woocommerce Tabs

WordPress plugin Category and Product Woocommerce Tabs scored89%from 54 tests.

About plugin

  • Plugin page: category-and-prod...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Jan 20, 2018
  • Number of updates: 11
  • Update frequency: every 47.7 days
  • Top authors: ikhodal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /4,042 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.04ms] Passed 4 tests

This is a short check of server-side resources used by Category and Product Woocommerce Tabs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.77 ▼5.49
Dashboard /wp-admin3.40 ▲0.1047.73 ▲0.14
Posts /wp-admin/edit.php3.51 ▲0.1647.33 ▲0.14
Add New Post /wp-admin/post-new.php5.98 ▲0.1091.63 ▼10.93
Media Library /wp-admin/upload.php3.32 ▲0.1036.12 ▲3.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_wccategorytab

Browser metrics Passed 4 tests

Checking browser requirements for Category and Product Woocommerce Tabs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲16513.77 ▼0.798.21 ▲6.4640.61 ▼11.87
Dashboard /wp-admin2,213 ▲255.90 ▲0.02110.64 ▼3.5942.73 ▼2.37
Posts /wp-admin/edit.php2,099 ▲102.03 ▼0.0340.55 ▲2.8240.43 ▲4.98
Add New Post /wp-admin/post-new.php1,530 ▼418.52 ▼4.56603.88 ▼2.1855.85 ▲3.52
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.0395.81 ▼5.1842.13 ▼2.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_wccategorytab
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 30 tag instead of maximum 10
The official readme.txt is a good inspiration

category-and-product-woocommerce-tabs/plugin.php 92% from 13 tests

"Category and Product Woocommerce Tabs" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("category-and-product-woocommerce-tabs.php" instead of "plugin.php")

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 plugin1,710 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP112193841,192
JavaScript2400232
PO File1730164
CSS298122

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.33
▷ Minimum class complexity5.00
▷ Maximum class complexity24.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/view.png1.80KB1.14KB▼ 36.27%
assets/images/right-icon.png0.36KB0.44KB0.00%
assets/images/view-more.png0.36KB0.33KB▼ 7.14%
assets/images/cart.png0.48KB0.47KB▼ 1.84%
assets/images/searchicon.png0.80KB0.82KB0.00%