84% birch-layered-nav

Code Review | Birch Layered Nav

WordPress plugin Birch Layered Nav scored84%from 54 tests.

About plugin

  • Plugin page: birch-layered-nav
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.4
  • WordPress version: 6.3.1
  • First release: May 4, 2017
  • Latest release: May 4, 2017
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: danyn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /938 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
Installer ran successfully

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

Analyzing server-side resources used by Birch Layered Nav
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.04 ▼2.69
Dashboard /wp-admin3.31 ▲0.0042.95 ▼3.72
Posts /wp-admin/edit.php3.36 ▲0.0044.41 ▼1.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.68 ▼7.37
Media Library /wp-admin/upload.php3.23 ▲0.0033.06 ▼0.25

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Birch Layered Nav
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.111.59 ▲0.0037.45 ▼0.88
Dashboard /wp-admin2,203 ▲155.78 ▼0.1398.45 ▼2.7636.26 ▼6.09
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0838.38 ▲3.2534.18 ▲0.06
Add New Post /wp-admin/post-new.php1,533 ▲1423.27 ▲0.31678.05 ▲14.1359.74 ▲0.88
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0891.58 ▼21.3744.07 ▼6.34

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Widget_Layered_Nav' not found in wp-content/plugins/birch-layered-nav/birch-layered-nav-extend.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)
There were no browser issues found

Optimizations

Plugin configuration 97% 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 require attention:
  • Screenshots: These screenshots do not have images: #1 (Select A Birch Layered Nav), #2 (Provide a Space Separated List of Product Categories, a Title, and the Atribute to filter on)
You can take inspiration from this readme.txt

birch-layered-nav/birch-layered-nav.php Passed 13 tests

This is the main PHP file of "Birch Layered Nav" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
132 characters long description:
Extends the Woocoomerce layered nav widget to include a category filter and passes more information in the urls of variable products

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin206 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45621206

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity8.33
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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
There were not PNG files found in your plugin