84% woocommerce-inspector

Code Review | WooCommerce Inspector

WordPress plugin WooCommerce Inspector scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-inspe...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.0
  • WordPress version: 6.3.1
  • First release: Mar 20, 2015
  • Latest release: Dec 10, 2018
  • Number of updates: 6
  • Update frequency: every 227.0 days
  • Top authors: barrykooij (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,339 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.28ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Inspector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.55 ▲3.26
Dashboard /wp-admin3.36 ▲0.0550.11 ▼0.12
Posts /wp-admin/edit.php3.47 ▲0.1146.29 ▼8.52
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.43 ▼7.94
Media Library /wp-admin/upload.php3.28 ▲0.0533.99 ▼4.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Inspector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9113.27 ▼1.112.33 ▲0.0146.25 ▲4.57
Dashboard /wp-admin2,224 ▲184.89 ▲0.02101.57 ▼2.4140.99 ▼5.44
Posts /wp-admin/edit.php2,097 ▼32.02 ▼0.0334.47 ▼5.7838.11 ▲1.08
Add New Post /wp-admin/post-new.php1,545 ▲1923.17 ▲5.70665.21 ▼2.8950.49 ▼1.28
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.0096.41 ▼13.3343.36 ▼2.25

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PhpSpec\\ObjectBehavior' not found in wp-content/plugins/woocommerce-inspector/vendor/wpupdatephp/wp-update-php/spec/WPUpdatePhpSpec.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BarryKooijPlugins\\WooCommerceInspector\\add_action() in wp-content/plugins/woocommerce-inspector/src/Plugin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: inspector, woocomemerce, woocommerce inspector, template, wow

woocommerce-inspector/woocommerce-inspector.php Passed 13 tests

"WooCommerce Inspector" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
83 characters long description:
The easiest way to find out what WooCommerce templates are used for which elements.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin773 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP14124230445
JavaScript32317145
JSON40084
LESS21037
CSS40036
Markdown215026

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity8.11
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods38
▷ Static methods410.53%
▷ Public methods3592.11%
▷ Protected methods00.00%
▷ Private methods37.89%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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 files were detected