78% ds-woocommerce-next-previous-category-products

Code Review | DS Woocommerce Next Previous Category Products

WordPress plugin DS Woocommerce Next Previous Category Products scored 78% from 54 tests.

About plugin

  • Plugin page: ds-woocommerce-ne...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.1
  • WordPress version: 5.8.1
  • First release: Jan 22, 2018
  • Latest release: Jan 22, 2018
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: dswpsupport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 724 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: ▼1.80MB] [CPU: ▼192.53ms] Passed 4 tests

Analyzing server-side resources used by DS Woocommerce Next Previous Category Products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0734.97 ▲0.48
Dashboard /wp-admin1.85 ▼1.205.49 ▼40.33
Posts /wp-admin/edit.php1.85 ▼1.266.08 ▼43.40
Add New Post /wp-admin/post-new.php1.85 ▼3.585.85 ▼659.20
Media Library /wp-admin/upload.php1.85 ▼1.155.86 ▼27.19
Next Previous products settings /wp-admin/options-general.php?page=ds-setting-admin1.857.56

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for DS Woocommerce Next Previous Category Products
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲7016.31 ▲0.477.25 ▲0.0954.72 ▼1.60
Dashboard /wp-admin2,998 ▲676.40 ▲0.45136.39 ▼14.46117.95 ▲7.84
Posts /wp-admin/edit.php2,769 ▲302.74 ▲0.0567.63 ▲2.2099.00 ▲7.69
Add New Post /wp-admin/post-new.php1,635 ▲13722.02 ▲3.10275.71 ▼101.62127.34 ▲16.85
Media Library /wp-admin/upload.php1,838 ▲315.40 ▲0.36130.92 ▼20.55120.42 ▼4.50
Next Previous products settings /wp-admin/options-general.php?page=ds-setting-admin1,7193.0984.0677.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ds-setting-admin
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=ds-setting-admin
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the Ds-ProductNav-Settings handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ds-woocommerce-next-previous-category-products/includes/wnppSettingsPage.inc.php:251

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt might help

ds-woocommerce-next-previous-category-products/DS Woocommerce Next Previous Category Products.php 92% from 13 tests

"DS Woocommerce Next Previous Category Products" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ds-woocommerce-next-previous-category-products.php" instead of "DS Woocommerce Next Previous Category Products.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
Everything looks great! No dangerous files found in this plugin5,393 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS20132,328
PHP27269389
JavaScript1215

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin