84% wc-products-by-brands

Code Review | WC Products by Brands

WordPress plugin WC Products by Brands scored84%from 54 tests.

About plugin

  • Plugin page: wc-products-by-br...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2015
  • Latest release: Dec 28, 2022
  • Number of updates: 27
  • Update frequency: every 106.2 days
  • Top authors: nwmcinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by WC Products by Brands
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.88 ▼4.97
Dashboard /wp-admin3.31 ▲0.0045.97 ▼1.41
Posts /wp-admin/edit.php3.36 ▲0.0047.35 ▼0.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.13 ▼1.43
Media Library /wp-admin/upload.php3.23 ▲0.0034.40 ▼0.77

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WC Products by Brands
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.66 ▼0.724.26 ▲2.5137.70 ▼5.77
Dashboard /wp-admin2,203 ▲125.83 ▲0.9496.28 ▼5.0140.79 ▼2.64
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0340.88 ▼1.4537.09 ▲1.64
Add New Post /wp-admin/post-new.php1,540 ▼023.31 ▼0.04594.71 ▼40.9947.20 ▼10.20
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0295.35 ▼0.4241.24 ▼1.18

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wc-products-by-brands/wc-brand-list.php:62

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: woocommerce, brands, store, tags

wc-products-by-brands/wc-brand-list.php 92% from 13 tests

Analyzing the main PHP file in "WC Products by Brands" version 1.2
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-products-by-brands.php" instead of "wc-brand-list.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171540

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin