84% manual-related-products-for-woo

Code Review | Manual Related Products for WooCommerce

WordPress plugin Manual Related Products for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: manual-related-pr...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8
  • WordPress version: 6.3.1
  • First release: May 26, 2020
  • Latest release: Jul 25, 2021
  • Number of updates: 7
  • Update frequency: every 60.7 days
  • Top authors: mikebricknellbarlow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /605 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.60ms] Passed 4 tests

Server-side resources used by Manual Related Products for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0241.17 ▲1.30
Dashboard /wp-admin3.36 ▲0.0249.49 ▼0.58
Posts /wp-admin/edit.php3.48 ▲0.0852.34 ▲1.73
Add New Post /wp-admin/post-new.php5.94 ▲0.0299.55 ▲6.15
Media Library /wp-admin/upload.php3.29 ▲0.0238.82 ▼0.04

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Manual Related Products for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.68 ▲0.121.97 ▲0.4043.43 ▲2.42
Dashboard /wp-admin2,195 ▲155.60 ▼0.0591.68 ▲3.3538.19 ▼7.81
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0239.57 ▼1.7836.58 ▼7.46
Add New Post /wp-admin/post-new.php1,528 ▼023.44 ▲0.32683.04 ▲4.9750.84 ▼3.13
Media Library /wp-admin/upload.php1,394 ▼64.28 ▲0.1495.04 ▼20.9641.26 ▼8.67

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/manual-related-products-for-woo/templates/partial-related-products-tab.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/manual-related-products-for-woo/manual-related-products-for-woo.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: woocommerce, products, related

manual-related-products-for-woo/manual-related-products-for-woo.php Passed 13 tests

The entry point to "Manual Related Products for WooCommerce" version 1.0.2 is a PHP file that has certain tags in its header comment area
129 characters long description:
Allows you to choose a manual set of products for display under the Related Products section on WooCommerce single product pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin78 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3181578

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin