77% darven-multiplos-precos-informativos

Code Review | Darven Múltiplos Preços Informativos

WordPress plugin Darven Múltiplos Preços Informativos scored77%from 54 tests.

About plugin

  • Plugin page: darven-multiplos-...
  • Plugin version: 3.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2022
  • Latest release: Jul 8, 2023
  • Number of updates: 53
  • Update frequency: every 3.8 days
  • Top authors: fkdarven (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼4.63ms] Passed 4 tests

Server-side resources used by Darven Múltiplos Preços Informativos
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3245.49 ▲3.64
Dashboard /wp-admin3.65 ▲0.3450.02 ▼1.38
Posts /wp-admin/edit.php3.70 ▲0.3451.28 ▲1.92
Add New Post /wp-admin/post-new.php6.16 ▲0.2887.14 ▼21.36
Media Library /wp-admin/upload.php3.51 ▲0.2841.38 ▲2.32
Preço á Vista e com Parcelamento /wp-admin/admin.php?page=darven-epi-admin3.4838.71

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Darven Múltiplos Preços Informativos: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.72 ▼0.635.98 ▲4.0648.98 ▲6.17
Dashboard /wp-admin2,206 ▲185.84 ▲0.9697.65 ▼11.7738.23 ▼9.71
Posts /wp-admin/edit.php2,089 ▲32.02 ▲0.0137.64 ▲0.3234.28 ▲0.65
Add New Post /wp-admin/post-new.php1,533 ▼223.43 ▲0.35664.17 ▼11.9555.34 ▼0.55
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.08101.16 ▼7.4744.83 ▼1.85
Preço á Vista e com Parcelamento /wp-admin/admin.php?page=darven-epi-admin1,0282.0525.5729.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=darven-epi-admin
    • > Notice in wp-content/plugins/darven-multiplos-precos-informativos/includes/admin/settings/class-darven-epi-general-settings-fields.php+296
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/darven-multiplos-precos-informativos/templates/admin/general-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/darven-multiplos-precos-informativos/includes/admin/settings/class-epi-general-settings.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/darven-multiplos-precos-informativos/public/partials/darven-epi-custom-css.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/darven-multiplos-precos-informativos/uninstall.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #5 is required in darven-multiplos-precos-informativos/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === darven-multiplos-precos-informativos === )
The official readme.txt is a good inspiration

darven-multiplos-precos-informativos/darven-extra-price-info.php 85% from 13 tests

"Darven Múltiplos Preços Informativos" version 3.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("darven-multiplos-precos-informativos.php" instead of "darven-extra-price-info.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,803 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP244704371,289
PO File17047203
JavaScript55440199
CSS3150112

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.26
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods113
▷ Static methods21.77%
▷ Public methods9987.61%
▷ Protected methods00.00%
▷ Private methods1412.39%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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