78% elex-woocommerce-catalog-mode

Code Review | ELEX WooCommerce Catalog Mode

WordPress plugin ELEX WooCommerce Catalog Mode scored78%from 54 tests.

About plugin

  • Plugin page: elex-woocommerce-...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 5, 2019
  • Latest release: Oct 16, 2023
  • Number of updates: 43
  • Update frequency: every 36.4 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

10,000+ active /155,843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.30ms] Passed 4 tests

An overview of server-side resources used by ELEX WooCommerce Catalog Mode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.66 ▲3.35
Dashboard /wp-admin3.31 ▲0.0042.96 ▼2.92
Posts /wp-admin/edit.php3.36 ▲0.0047.92 ▼3.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.51 ▼6.80
Media Library /wp-admin/upload.php3.23 ▲0.0035.02 ▲0.07

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

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

Browser metrics Passed 4 tests

ELEX WooCommerce Catalog Mode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.24 ▼0.391.70 ▲0.1643.50 ▲1.74
Dashboard /wp-admin2,198 ▲185.61 ▼0.0091.36 ▲8.3338.68 ▼6.74
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0235.36 ▼6.1031.89 ▼6.56
Add New Post /wp-admin/post-new.php1,526 ▼223.26 ▲0.11661.21 ▲0.1456.27 ▼2.83
Media Library /wp-admin/upload.php1,400 ▼04.14 ▲0.0094.50 ▼3.2941.34 ▼1.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/elex-woocommerce-catalog-mode/review_and_troubleshoot_notify/resources/logo.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-catalog-mode/review_and_troubleshoot_notify/resources/troubleshoot.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-catalog-mode/review_and_troubleshoot_notify/resources/review.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-woocommerce-catalog-mode/includes/market.php:91

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce, hide price, woocommerce catalog only, woocommerce catalog mode, catalog mode

elex-woocommerce-catalog-mode/elex-catalog-mode.php 77% from 13 tests

The entry point to "ELEX WooCommerce Catalog Mode" version 1.4.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "2.6.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("elex-woocommerce-catalog-mode.php" instead of "elex-catalog-mode.php")

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
There were no executable files found in this plugin8,335 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS1606,712
PHP11153851,548
JavaScript115275

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity33.80
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods55
▷ Static methods35.45%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.40MB with 0.30MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/Advanced Bulk Edit.png69.40KB15.94KB▼ 77.03%
resources/Dynamic Pricing & Discounts.png90.78KB22.92KB▼ 74.75%
resources/wsdesk.png161.93KB43.90KB▼ 72.89%
resources/prod-logo.png85.64KB21.17KB▼ 75.28%