83% donuz

Code Review | Integrador Donuz Woocommerce

WordPress plugin Integrador Donuz Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: donuz
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: May 26, 2016
  • Latest release: Jun 2, 2016
  • Number of updates: 15
  • Update frequency: every 0.5 days
  • Top authors: robsonalvesbh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /793 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.54ms] Passed 4 tests

Server-side resources used by Integrador Donuz Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.64 ▼0.37
Dashboard /wp-admin3.34 ▲0.0449.87 ▼14.06
Posts /wp-admin/edit.php3.46 ▲0.1051.21 ▼0.56
Add New Post /wp-admin/post-new.php5.92 ▲0.04104.05 ▲3.92
Media Library /wp-admin/upload.php3.27 ▲0.0438.37 ▼7.18
Donuz /wp-admin/admin.php?page=integrador_donuz3.2333.78

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/donuz/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
dnz_log_exec
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
dnz_date_start
widget_recent-comments

Browser metrics Passed 4 tests

Integrador Donuz Woocommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9413.71 ▼0.842.09 ▼0.0341.27 ▼0.38
Dashboard /wp-admin2,233 ▲304.92 ▼0.98115.87 ▲0.5443.88 ▼2.93
Posts /wp-admin/edit.php2,118 ▲152.24 ▲0.2039.88 ▼1.5634.80 ▼2.81
Add New Post /wp-admin/post-new.php1,540 ▲423.24 ▲0.16648.47 ▼41.5167.30 ▲13.50
Media Library /wp-admin/upload.php1,415 ▲154.28 ▲0.05116.50 ▲11.0647.76 ▲0.38
Donuz /wp-admin/admin.php?page=integrador_donuz8401.7626.4224.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/donuz/class/views/inicio.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Class_dnz_curl' not found in wp-content/plugins/donuz/class/Class_dnz_cron.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/donuz/integrador-donuz-woocommerce.php:17

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === donuz === )
The official readme.txt might help

donuz/integrador-donuz-woocommerce.php 85% from 13 tests

The principal PHP file in "Integrador Donuz Woocommerce" v. 1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("donuz.php" instead of "integrador-donuz-woocommerce.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 188 characters long)

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
No dangerous file extensions were detected307 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP86254294
JavaScript10013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1173.33%
▷ Protected methods16.67%
▷ Private methods320.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected