82% woocommerce-view

Code Review | WooCommerce View

WordPress plugin WooCommerce View scored82%from 54 tests.

About plugin

  • Plugin page: woocommerce-view
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 6, 2013
  • Latest release: Oct 6, 2013
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: tandubhai (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /8,880 total downloads

Benchmarks

Plugin footprint 82% 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.06MB] [CPU: ▼0.85ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.21 ▼2.84
Dashboard /wp-admin3.37 ▲0.0756.92 ▲3.66
Posts /wp-admin/edit.php3.42 ▲0.0650.38 ▲1.01
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.13 ▼4.54
Media Library /wp-admin/upload.php3.29 ▲0.0641.37 ▲2.99

Server storage [IO: ▲0.73MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/woocommerce-view/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce View
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.17 ▼1.581.73 ▼0.1543.98 ▼1.10
Dashboard /wp-admin2,215 ▲124.84 ▼0.14107.30 ▼10.7039.91 ▼4.02
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0539.45 ▲2.4034.28 ▼1.63
Add New Post /wp-admin/post-new.php1,550 ▲323.40 ▲0.06647.77 ▼54.9656.18 ▲2.05
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.03107.76 ▲1.2147.03 ▲0.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-view/view.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (List View), #2 (Date View), #3 (Grid View), #4 (Map View)
You can take inspiration from this readme.txt

woocommerce-view/view.php 69% from 13 tests

"WooCommerce View" version 1.0'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:
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "3.1")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-view.php" instead of "view.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,014 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41864321,445
PHP18727391
CSS1548178

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.62MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png203.26KB71.30KB▼ 64.92%
screenshot-1.png90.85KB31.52KB▼ 65.30%
assets/images/icon.png12.52KB3.53KB▼ 71.80%
screenshot-3.png238.24KB78.74KB▼ 66.95%
screenshot-2.png92.44KB32.47KB▼ 64.87%