84% sugester-for-woocommerce

Code Review | Sugester for WooCommerce

WordPress plugin Sugester for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: sugester-for-wooc...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.0
  • WordPress version: 6.3.1
  • First release: Sep 7, 2016
  • Latest release: Aug 11, 2017
  • Number of updates: 32
  • Update frequency: every 10.6 days
  • Top authors: sugester (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /991 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.35ms] Passed 4 tests

This is a short check of server-side resources used by Sugester for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.65 ▼0.64
Dashboard /wp-admin3.34 ▲0.0351.29 ▼1.01
Posts /wp-admin/edit.php3.39 ▲0.0350.18 ▲0.73
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.14 ▼8.75
Media Library /wp-admin/upload.php3.26 ▲0.0336.51 ▼2.98

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sugester for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.54 ▲0.271.77 ▲0.0440.21 ▼2.02
Dashboard /wp-admin2,192 ▲185.56 ▼0.0788.42 ▼3.7841.39 ▲1.21
Posts /wp-admin/edit.php2,103 ▼02.03 ▲0.0835.05 ▼5.6734.17 ▼2.48
Add New Post /wp-admin/post-new.php1,531 ▲322.97 ▼0.16669.41 ▲16.1660.65 ▲8.28
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.01100.98 ▼2.7144.67 ▼1.44

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/sugester-for-woocommerce/includes/hooks/class-wc-sugester-hook-display-user.php on line 69

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

sugester-for-woocommerce/sugester-for-woocommerce.php Passed 13 tests

The primary PHP file in "Sugester for WooCommerce" version 1.0.9 is used by WordPress to initiate all plugin functionality
36 characters long description:
Integrates Sugester with WooCommerce

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
Everything looks great! No dangerous files found in this plugin2,145 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP235301,4851,786
PO File16270206
JavaScript42653152
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.56
▷ Minimum class complexity4.00
▷ Maximum class complexity61.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods129
▷ Static methods1713.18%
▷ Public methods10682.17%
▷ Protected methods00.00%
▷ Private methods2317.83%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected