10% demomentsomtres-wine-catalog

Code Review | DeMomentSomTres Wine and Cheese Catalog

WordPress plugin DeMomentSomTres Wine and Cheese Catalog scored10%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-w...
  • Plugin version: 2.05
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.5
  • WordPress version: 6.3.1
  • First release: Jun 13, 2013
  • Latest release: Apr 26, 2016
  • Number of updates: 30
  • Update frequency: every 35.0 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,361 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/demomentsomtres-wine-catalog/demomentsomtres-catalog.php+61
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.47ms] Passed 4 tests

A check of server-side resources used by DeMomentSomTres Wine and Cheese Catalog
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.73 ▼36.18
Dashboard /wp-admin2.05 ▼1.266.70 ▼42.64
Posts /wp-admin/edit.php2.05 ▼1.317.21 ▼42.91
Add New Post /wp-admin/post-new.php2.05 ▼3.847.59 ▼96.15
Media Library /wp-admin/upload.php2.05 ▼1.186.19 ▼29.67
Product Types /wp-admin/edit-tags.php?taxonomy=product-type&post_type=product2.055.77
Milk Types /wp-admin/edit-tags.php?taxonomy=product-cheese-milk-type&post_type=product2.056.11
Producers /wp-admin/edit-tags.php?taxonomy=product-mark&post_type=product2.057.71
Products /wp-admin/edit.php?post_type=product2.056.89
Add Product /wp-admin/post-new.php?post_type=product2.055.91
Wine Grapes /wp-admin/edit-tags.php?taxonomy=product-wine-grape&post_type=product2.0512.16
Allergens /wp-admin/edit-tags.php?taxonomy=product-allergens-info&post_type=product2.056.07
Milk origins /wp-admin/edit-tags.php?taxonomy=product-cheese-milk-animal&post_type=product2.057.37
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins2.057.10
Wine Types /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product2.056.85

Server storage [IO: ▲0.24MB] [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: 10 new files
Database: no new tables, 11 new options
New WordPress options
widget_productsincategorywidget
widget_recent-comments
db_upgraded
widget_productsalesurlwidget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_productnamewidget
widget_markdescriptionwidget
widget_marklogowidget
...

Browser metrics Passed 4 tests

DeMomentSomTres Wine and Cheese Catalog: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13614.34 ▼0.191.73 ▲0.2637.09 ▼3.16
Dashboard /wp-admin2,300 ▲1235.55 ▼0.1282.35 ▼1.4641.67 ▼1.58
Posts /wp-admin/edit.php2,214 ▲1112.16 ▲0.1842.68 ▲7.1046.69 ▲12.73
Add New Post /wp-admin/post-new.php1,614 ▲8823.16 ▲0.17694.44 ▲20.9863.56 ▲8.13
Media Library /wp-admin/upload.php1,516 ▲1164.25 ▲0.0995.86 ▼5.7447.66 ▲1.19
Product Types /wp-admin/edit-tags.php?taxonomy=product-type&post_type=product1,3902.3030.0235.62
Milk Types /wp-admin/edit-tags.php?taxonomy=product-cheese-milk-type&post_type=product1,3902.3027.5131.15
Producers /wp-admin/edit-tags.php?taxonomy=product-mark&post_type=product1,3872.3028.0233.60
Products /wp-admin/edit.php?post_type=product1,2291.9933.5335.31
Add Product /wp-admin/post-new.php?post_type=product2,6157.86165.6069.57
Wine Grapes /wp-admin/edit-tags.php?taxonomy=product-wine-grape&post_type=product1,3842.3127.9830.29
Allergens /wp-admin/edit-tags.php?taxonomy=product-allergens-info&post_type=product1,3902.3026.8236.42
Milk origins /wp-admin/edit-tags.php?taxonomy=product-cheese-milk-animal&post_type=product1,3872.3128.2535.77
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0412.0625.3824.52
Wine Types /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product1,3872.3127.5433.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/demomentsomtres-wine-catalog/demomentsomtres-catalog.php+61
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_productsalesurlwidget
    • widget_theysaidso_widget
    • widget_marklogowidget
    • widget_recent-posts
    • can_compress_scripts
    • widget_productsincategorywidget
    • widget_productnamewidget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 66 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product
    • > Deprecated in wp-content/plugins/demomentsomtres-wine-catalog/demomentsomtres-catalog.php+66
    Function create_function() is deprecated
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ProductNameWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in MarkDescriptionWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ProductsInCategoryWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ProductSalesURLWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product-wine-type&post_type=product
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in MarkLogoWidget is deprecated since version 4.3.0! Use __construct() instead.

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 items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/demomentsomtres-wine-catalog/lib/class-tgm-plugin-activation.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/demomentsomtres-wine-catalog/lib/class-tgm-plugin-activation.php:161
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/demomentsomtres-wine-catalog/demomentsomtres-catalog-widgets.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: wines, product portfolio, cheese

demomentsomtres-wine-catalog/demomentsomtres-catalog.php 85% from 13 tests

The primary PHP file in "DeMomentSomTres Wine and Cheese Catalog" version 2.05 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 285 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("demomentsomtres-wine-catalog.php" instead of "demomentsomtres-catalog.php")

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
There were no executable files found in this plugin3,217 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34398762,431
PO File2251314643
Markdown1500143

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.00
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods95
▷ Static methods11.05%
▷ Public methods8993.68%
▷ Protected methods66.32%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants00.00%
▷ Class constants16100.00%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin