77% woo-easy-view

Code Review | Woocommerce Easy View

WordPress plugin Woocommerce Easy View scored77%from 54 tests.

About plugin

  • Plugin page: woo-easy-view
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Apr 17, 2017
  • Latest release: Apr 6, 2017
  • Number of updates: 6
  • Update frequency: every 14.7 days
  • Top authors: reverti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.57MB] [CPU: ▼4.33ms] Passed 4 tests

A check of server-side resources used by Woocommerce Easy View
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5945.20 ▲3.46
Dashboard /wp-admin3.91 ▲0.5755.77 ▼8.34
Posts /wp-admin/edit.php3.96 ▲0.6154.59 ▲3.21
Add New Post /wp-admin/post-new.php6.45 ▲0.5787.56 ▼15.66
Media Library /wp-admin/upload.php3.77 ▲0.5442.71 ▲3.92
New view /wp-admin/post-new.php?post_type=easy_search3.7846.44
View /wp-admin/edit.php?post_type=easy_search3.8141.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 78 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Easy View
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲17713.81 ▼0.576.28 ▲4.2241.79 ▲1.47
Dashboard /wp-admin2,251 ▲485.02 ▼0.87108.14 ▲2.8883.90 ▲38.93
Posts /wp-admin/edit.php2,153 ▲502.28 ▲0.2936.10 ▼6.1631.42 ▼3.93
Add New Post /wp-admin/post-new.php1,571 ▲2323.35 ▲0.13784.15 ▲179.1135.49 ▼23.93
Media Library /wp-admin/upload.php1,447 ▲534.59 ▲0.4299.30 ▲1.6270.35 ▲27.51
New view /wp-admin/post-new.php?post_type=easy_search2,6342.8876.6292.77
View /wp-admin/edit.php?post_type=easy_search1,1332.2132.3429.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=easy_search
    • > Notice in wp-content/plugins/woo-easy-view/includes/r_s_flibs.php+69
    Undefined variable: _SESSION
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=easy_search
    • > Notice in wp-content/plugins/woo-easy-view/includes/class-r_wev_search-define.php+461
    Undefined variable: all_taxonomy

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-easy-view/public/partials/r_wev_search_public-display.php
    • > /wp-content/plugins/woo-easy-view/admin/partials/r_wev_search-admin-display.php

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: The official readme.txt is a good inspiration

woo-easy-view/r_wev_search.php 85% from 13 tests

The primary PHP file in "Woocommerce Easy View" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-easy-view.php" instead of "r_wev_search.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin6,329 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP164656372,954
CSS111411632,518
PO File5315315838
JavaScript482715
INI1004

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 368)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity62.89
▷ Minimum class complexity1.00
▷ Maximum class complexity511.00
Average method complexity9.31
▷ Minimum method complexity1.00
▷ Maximum method complexity368.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods67
▷ Static methods22.99%
▷ Public methods5176.12%
▷ Protected methods00.00%
▷ Private methods1623.88%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
25 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/colorpicker/images/colorpicker_hex.png0.52KB0.42KB▼ 19.92%
admin/images/sprite.png5.94KB2.82KB▼ 52.51%
admin/js/colorpicker/images/colorpicker_submit.png0.96KB1.04KB0.00%
admin/js/colorpicker/images/custom_hsb_b.png1.07KB0.82KB▼ 23.61%
admin/js/colorpicker/images/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%