84% woocommerce-product-navigation

Code Review | WooCommerce Product Navigation

WordPress plugin WooCommerce Product Navigation scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-3.91
  • WordPress version: 6.3.1
  • First release: Jun 10, 2014
  • Latest release: Jun 10, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: jtwiest (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /7,812 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼13.18ms] Passed 4 tests

Server-side resources used by WooCommerce Product Navigation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0126.21 ▼15.07
Dashboard /wp-admin3.38 ▲0.0348.48 ▼12.79
Posts /wp-admin/edit.php3.43 ▲0.0743.55 ▼4.81
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.20 ▼20.05
Media Library /wp-admin/upload.php3.30 ▲0.0734.58 ▼0.92

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Product Navigation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼27013.28 ▼1.280.50 ▼1.2318.32 ▼20.43
Dashboard /wp-admin2,206 ▲185.86 ▲0.99103.64 ▼7.5339.33 ▼4.62
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0537.15 ▼4.6432.06 ▼4.04
Add New Post /wp-admin/post-new.php1,514 ▼1917.67 ▼5.60641.34 ▼29.2371.76 ▲12.78
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0298.06 ▼10.7344.57 ▼1.20
Product Navigation /wp-admin/wpn-settings.php260.440.1113.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • wpn_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/wpn-settings.php
    • > Network (severe)
    wp-admin/wpn-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Adjust where your navigation buttons will display and what it will look like.)
You can look at the official readme.txt

woocommerce-product-navigation/woocommerce-product-navigation.php 92% from 13 tests

The main file in "WooCommerce Product Navigation" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 237 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin477 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP211586373
CSS23054
JavaScript1171950

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.84
Average class complexity44.50
▷ Minimum class complexity33.00
▷ Maximum class complexity56.00
Average method complexity7.21
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png126.65KB43.94KB▼ 65.31%
assets/img/wpbo-logo.png24.75KB8.99KB▼ 63.66%
screenshot-1.png116.84KB38.59KB▼ 66.97%