74% tcp-category-subdomains

Code Review | Category Subdomains for Woocommerce by TheCartPress

WordPress plugin Category Subdomains for Woocommerce by TheCartPress scored74%from 54 tests.

About plugin

  • Plugin page: tcp-category-subd...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8.4
  • WordPress version: 6.3.1
  • First release: Aug 10, 2020
  • Latest release: Jul 20, 2022
  • Number of updates: 17
  • Update frequency: every 42.1 days
  • Top authors: tcpteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,730 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.85MB] [CPU: ▼46.85ms] Passed 4 tests

This is a short check of server-side resources used by Category Subdomains for Woocommerce by TheCartPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.359.27 ▼29.60
Dashboard /wp-admin2.16 ▼1.1410.87 ▼37.71
Posts /wp-admin/edit.php2.16 ▼1.197.73 ▼36.80
Add New Post /wp-admin/post-new.php2.16 ▼3.737.70 ▼83.27
Media Library /wp-admin/upload.php2.16 ▼1.078.38 ▼24.09
TCP Plugins /wp-admin/admin.php?page=thecartpress2.167.90
Category Subdomains /wp-admin/admin.php?page=tcp-subdomain-admin2.168.69

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Category Subdomains for Woocommerce by TheCartPress: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,498 ▼24813.18 ▼1.180.64 ▼0.8816.60 ▼25.62
Dashboard /wp-admin2,248 ▲605.88 ▲0.9698.18 ▼6.0588.49 ▲44.94
Posts /wp-admin/edit.php2,134 ▲452.02 ▼0.1339.11 ▲0.5933.40 ▼1.38
Add New Post /wp-admin/post-new.php1,558 ▲1623.49 ▲5.14689.88 ▲76.1967.01 ▲16.19
Media Library /wp-admin/upload.php1,430 ▲394.23 ▲0.0793.00 ▼4.5774.94 ▲30.89
TCP Plugins /wp-admin/admin.php?page=thecartpress9432.0325.6728.96
Category Subdomains /wp-admin/admin.php?page=tcp-subdomain-admin8452.2023.8125.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/tcp-category-subdomains/options.php+26
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tcp-subdomain-admin
    • > Notice in wp-content/plugins/tcp-category-subdomains/options.php+26
    Trying to access array offset on value of type bool

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
8 plugin tags: category, woocommerce, product, thecartpress, post...

tcp-category-subdomains/tcp-category-subdomains.php Passed 13 tests

Analyzing the main PHP file in "Category Subdomains for Woocommerce by TheCartPress" version 1.4.0
79 characters long description:
This plugin can converts post and woocommerce product categories to subdomains.

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
Success! There were no dangerous files found in this plugin937 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4126261889
CSS16033
SVG10115

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity22.50
▷ Minimum class complexity2.00
▷ Maximum class complexity76.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods50
▷ Static methods12.00%
▷ Public methods4998.00%
▷ Protected methods00.00%
▷ Private methods12.00%
Functions24
▷ Named functions1354.17%
▷ Anonymous functions1145.83%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/tcp-icon.png0.34KB0.29KB▼ 13.08%