84% vendus

Code Review | Vendus

WordPress plugin Vendus scored84%from 54 tests.

About plugin

  • Plugin page: vendus
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Apr 18, 2023
  • Latest release: Apr 18, 2023
  • Number of updates: 10
  • Update frequency: every 0.6 days
  • Top authors: vendus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /416 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.13MB] [CPU: ▲1.66ms] Passed 4 tests

Server-side resources used by Vendus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.74 ▼3.58
Dashboard /wp-admin3.44 ▲0.1350.40 ▼3.06
Posts /wp-admin/edit.php3.55 ▲0.1955.14 ▲4.69
Add New Post /wp-admin/post-new.php6.02 ▲0.13101.59 ▲8.58
Media Library /wp-admin/upload.php3.36 ▲0.1342.21 ▲9.18

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Vendus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.451.78 ▼0.1540.10 ▼5.47
Dashboard /wp-admin2,206 ▲185.82 ▼0.0699.50 ▼19.7439.39 ▼3.01
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0339.06 ▲2.2434.22 ▲0.79
Add New Post /wp-admin/post-new.php1,520 ▼423.22 ▲0.17649.80 ▲51.7462.51 ▲9.07
Media Library /wp-admin/upload.php1,385 ▼04.28 ▲0.11107.58 ▲0.8446.30 ▲2.24

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/vendus/views/config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/vendus/vendus.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Configuração do Plugin)
The official readme.txt might help

vendus/vendus.php Passed 13 tests

The main file in "Vendus" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
38 characters long description:
Integração Woocommerce com o Vendus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin865 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP813629819
Markdown19046

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity22.00
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods63
▷ Static methods2641.27%
▷ Public methods5993.65%
▷ Protected methods00.00%
▷ Private methods46.35%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants1794.44%
▷ Class constants15.56%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo_menu.png0.96KB0.49KB▼ 49.49%