83% bears-woocommerce-product-quick-view

Code Review | Bears WooCommerce Product Quick View

WordPress plugin Bears WooCommerce Product Quick View scored83%from 54 tests.

About plugin

  • Plugin page: bears-woocommerce...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.4
  • WordPress version: 6.3.1
  • First release: Dec 20, 2017
  • Latest release: Dec 20, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: huynhhuynh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /844 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.47ms] Passed 4 tests

Analyzing server-side resources used by Bears WooCommerce Product Quick View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.60 ▼2.55
Dashboard /wp-admin3.31 ▲0.0146.01 ▼0.32
Posts /wp-admin/edit.php3.36 ▲0.0147.78 ▲1.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.80 ▼4.66
Media Library /wp-admin/upload.php3.23 ▲0.0132.28 ▼2.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Bears WooCommerce Product Quick View
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.441.74 ▼0.5639.03 ▼10.73
Dashboard /wp-admin2,206 ▲215.88 ▲1.05102.60 ▼5.1241.09 ▲1.20
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0433.07 ▼7.8736.54 ▲0.73
Add New Post /wp-admin/post-new.php1,535 ▲2223.21 ▲5.61645.31 ▲32.8251.00 ▼6.91
Media Library /wp-admin/upload.php1,382 ▼94.17 ▼0.0398.32 ▼6.1646.08 ▼1.46

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bears-woocommerce-product-quick-view/i/bwc-functions.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bears-woocommerce-product-quick-view/i/bwc-functions.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/bears-woocommerce-product-quick-view/templates/modal-template.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: The official readme.txt is a good inspiration

bears-woocommerce-product-quick-view/bears-woocommerce-product-quick-view.php 85% from 13 tests

The principal PHP file in "Bears WooCommerce Product Quick View" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "3.0")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected786 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24830338
PHP67191229
CSS1223165
SVG10154

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected