62% eleshop

Code Review | Eleshop

WordPress plugin Eleshop scored62%from 54 tests.

About plugin

  • Plugin page: eleshop
  • Plugin version: 1.0.4.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Oct 8, 2023
  • Number of updates: 19
  • Update frequency: every 49.6 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /700 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.98MB] [CPU: ▲24.13ms] Passed 4 tests

An overview of server-side resources used by Eleshop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /8.86 ▲5.3568.94 ▲25.12
Dashboard /wp-admin8.88 ▲5.4988.17 ▲20.91
Posts /wp-admin/edit.php8.88 ▲5.4874.78 ▲22.86
Add New Post /wp-admin/post-new.php9.54 ▲3.61130.75 ▲27.61
Media Library /wp-admin/upload.php8.88 ▲5.6174.39 ▲35.81
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.8864.22

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 199 new files
Database: no new tables, 11 new options
New WordPress options
fs_debug_mode
can_compress_scripts
fs_accounts
theysaidso_admin_options
widget_recent-comments
fs_active_plugins
db_upgraded
jltels_activation_time
eleshop_addons_settings
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Eleshop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲8314.35 ▲0.002.32 ▲0.4237.48 ▼6.59
Dashboard /wp-admin2,260 ▲805.55 ▼0.1095.31 ▲1.1491.46 ▲50.68
Posts /wp-admin/edit.php2,184 ▲812.13 ▲0.1238.22 ▲1.4137.19 ▲0.48
Add New Post /wp-admin/post-new.php1,583 ▲4723.08 ▼0.08750.21 ▲90.1553.73 ▲5.36
Media Library /wp-admin/upload.php1,474 ▲744.17 ▼0.05104.49 ▼6.8876.63 ▲28.12
Settings /wp-admin/admin.php?page=eleshop-settings#/settings8722.1824.1227.81
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1131.7024.4526.33
Kickstart /wp-admin/admin.php?page=eleshop-settings#/8722.0126.4227.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/eleshop/libs/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • db_upgraded
    • widget_theysaidso_widget
    • eleshop_addons_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_accounts
    • fs_active_plugins
    • can_compress_scripts
    • widget_recent-posts
    • fs_debug_mode

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/eleshop/inc/admin/api/Settings_Route.php:7
    • > PHP Warning
      Use of undefined constant ELESHOP_ASSETS - assumed 'ELESHOP_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/eleshop/inc/classes/assets-manager.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/eleshop/inc/admin/api/Api.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Eleshop\\Inc\\Admin\\Elements\\esc_html__() in wp-content/plugins/eleshop/inc/admin/elements/third-party-plugins.php:14
    • > PHP Warning
      Use of undefined constant ELESHOP_ASSETS - assumed 'ELESHOP_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/eleshop/inc/classes/assets-manager.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Eleshop\\Inc\\Classes\\add_action() in wp-content/plugins/eleshop/inc/classes/assets-manager.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eleshop-settings#/
    • > Network (severe)
    wp-content/plugins/eleshop/assets/images/logo.svg - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eleshop-settings#/
    • > Network (severe)
    wp-content/plugins/eleshop/assets/css/eleshop-admin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eleshop-settings#/
    • > Network (severe)
    wp-content/plugins/eleshop/assets/js/manifest.js?ver=1.0.4.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eleshop-settings#/
    • > Network (severe)
    wp-content/plugins/eleshop/assets/js/vendor.js?ver=1.0.4.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eleshop-settings#/
    • > Network (severe)
    wp-content/plugins/eleshop/assets/js/eleshop-admin.js?ver=1.0.4.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% 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
4 plugin tags: woocommerce, elementor woocommerce addon, woocommerce addon, elementor

eleshop/eleshop.php 92% from 13 tests

The primary PHP file in "Eleshop" version 1.0.4.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin34,714 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1418,33217,78634,507
JavaScript33459194
CSS130013

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity73.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes11.64%
Methods1,377
▷ Static methods23517.07%
▷ Public methods97871.02%
▷ Protected methods231.67%
▷ Private methods37627.31%
Functions102
▷ Named functions9997.06%
▷ Anonymous functions32.94%
Constants163
▷ Global constants11469.94%
▷ Class constants4930.06%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
libs/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%