67% retrilhar-ecommerce

Code Review | Retrilhar Ecommerce

WordPress plugin Retrilhar Ecommerce scored67%from 54 tests.

About plugin

  • Plugin page: retrilhar-ecommerce
  • Plugin version: 0.2.14
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2021
  • Latest release: Nov 13, 2023
  • Number of updates: 43
  • Update frequency: every 20.5 days
  • Top authors: retrilhar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /600 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.60MB] [CPU: ▼21.05ms] Passed 4 tests

A check of server-side resources used by Retrilhar Ecommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.39 ▼3.62
Dashboard /wp-admin3.39 ▲0.0446.45 ▼16.43
Posts /wp-admin/edit.php3.52 ▲0.1647.82 ▼0.05
Add New Post /wp-admin/post-new.php3.28 ▼2.6138.55 ▼63.38
Media Library /wp-admin/upload.php3.32 ▲0.0834.47 ▼0.77
Produtos /wp-admin/admin.php?page=retrilhar_produtos3.3241.76
Retrilhar /wp-admin/admin.php?page=retrilhar3.3536.07
Retrilhar /wp-admin/plugins.php?page=retrilhar-page-shortcode3.3828.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: 2 new tables, 7 new options
New tables
wp_retrilhar_produto
wp_retrilhar_evento
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
retrilhar_ecommerce_version
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Retrilhar Ecommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17313.70 ▼0.478.25 ▲6.5739.04 ▼4.31
Dashboard /wp-admin2,234 ▲535.61 ▼0.0690.62 ▼9.6238.73 ▼1.54
Posts /wp-admin/edit.php2,169 ▲691.99 ▲0.0434.74 ▼7.0932.83 ▼6.43
Add New Post /wp-admin/post-new.php1,556 ▲3023.32 ▲0.01598.02 ▼21.3057.90 ▼2.32
Media Library /wp-admin/upload.php1,436 ▲394.28 ▲0.0596.11 ▼10.7141.25 ▼1.13
Produtos /wp-admin/admin.php?page=retrilhar_produtos9112.0023.7529.06
Retrilhar /wp-admin/admin.php?page=retrilhar1,4002.1625.1326.76
Retrilhar /wp-admin/plugins.php?page=retrilhar-page-shortcode8072.1522.0223.55

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
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=retrilhar-page-shortcode
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/retrilhar-ecommerce/retrilhar-ecommerce.php
    • > /wp-content/plugins/retrilhar-ecommerce/views/admin/shortcode-form.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/Calendario.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Model\\AbstractModel' not found in wp-content/plugins/retrilhar-ecommerce/src/Model/Evento.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/VitrinePeriodo.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/ProdutoValor.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Model\\AbstractModel' not found in wp-content/plugins/retrilhar-ecommerce/src/Model/Produto.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/VitrineEvento.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/VitrineProduto.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/ProdutoEvento.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/VitrineAtividade.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Retrilhar\\Shortcode\\AbstractShortcode' not found in wp-content/plugins/retrilhar-ecommerce/src/Shortcode/VitrineEventoPost.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=retrilhar-page-shortcode
    • > Javascript (severe) in unknown
    /wp-content/plugins/retrilhar-ecommerce/assets/js/admin.js?ver=0.2.11 2:26 Uncaught ReferenceError: inlineEditPost is not defined

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Listagem de produtos), #2 (Detalhes do produto)
You can take inspiration from this readme.txt

retrilhar-ecommerce/retrilhar-ecommerce.php Passed 13 tests

The primary PHP file in "Retrilhar Ecommerce" version 0.2.14 is used by WordPress to initiate all plugin functionality
38 characters long description:
Integração com o Retrilhar Ecommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,836 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP282741421,704
JavaScript381257
CSS27635
Markdown19020
SVG10020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.42
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes24
▷ Abstract classes28.33%
▷ Concrete classes2291.67%
▷ Final classes00.00%
Methods75
▷ Static methods5776.00%
▷ Public methods7498.67%
▷ Protected methods00.00%
▷ Private methods11.33%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.44MB with 0.22MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png30.97KB14.89KB▼ 51.92%
assets/icon-256x256.png111.31KB57.54KB▼ 48.31%
assets/banner-772x250.png312.61KB158.99KB▼ 49.14%