84% thekua-product-categories-on-shop

Code Review | Thekua - Product Categories on Shop

WordPress plugin Thekua - Product Categories on Shop scored84%from 54 tests.

About plugin

  • Plugin page: thekua-product-ca...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 10, 2023
  • Latest release: Jul 24, 2023
  • Number of updates: 4
  • Update frequency: every 41.2 days
  • Top authors: devinlabsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /156 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.07ms] Passed 4 tests

Server-side resources used by Thekua - Product Categories on Shop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.14 ▼0.33
Dashboard /wp-admin3.31 ▲0.0149.81 ▼2.03
Posts /wp-admin/edit.php3.37 ▲0.0149.46 ▼1.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.39 ▼12.70
Media Library /wp-admin/upload.php3.24 ▲0.0137.66 ▲1.72

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Thekua - Product Categories on Shop
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▼0.042.19 ▲0.1844.17 ▼0.40
Dashboard /wp-admin2,198 ▲185.67 ▲0.0081.81 ▼8.4640.81 ▼3.82
Posts /wp-admin/edit.php2,103 ▲32.05 ▲0.0640.16 ▲7.0338.03 ▼1.80
Add New Post /wp-admin/post-new.php1,545 ▲1423.19 ▲0.14652.87 ▼0.8851.95 ▼0.37
Media Library /wp-admin/upload.php1,400 ▼04.29 ▲0.02105.67 ▲1.6844.82 ▲0.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/thekua-product-categories-on-shop/admin/adminSetting.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/thekua-product-categories-on-shop/frontend/thekua-customization.php:4

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: categories, category on shop, category, shop, product categories...

thekua-product-categories-on-shop/thekua-categoryonshop.php 85% from 13 tests

This is the main PHP file of "Thekua - Product Categories on Shop" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("thekua-product-categories-on-shop.php" instead of "thekua-categoryonshop.php")

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
Everything looks great! No dangerous files found in this plugin101 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42419101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin