10% dni-woocommerce

Code Review | DNI WooCommerce

WordPress plugin DNI WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: dni-woocommerce
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 4, 2019
  • Latest release: Apr 17, 2020
  • Number of updates: 23
  • Update frequency: every 18.0 days
  • Top authors: camilo517 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /2,288 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.91MB] [CPU: ▼59.12ms] Passed 4 tests

Server-side resources used by DNI WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.39 ▼40.55
Dashboard /wp-admin2.09 ▼1.2110.12 ▼42.93
Posts /wp-admin/edit.php2.09 ▼1.269.55 ▼48.65
Add New Post /wp-admin/post-new.php2.09 ▼3.796.42 ▼104.35
Media Library /wp-admin/upload.php2.09 ▼1.146.26 ▼29.11

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for DNI WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.301.66 ▼0.2342.68 ▼0.29
Dashboard /wp-admin2,196 ▲195.55 ▼0.0389.13 ▼0.5237.05 ▼6.52
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0139.10 ▼1.4037.29 ▲0.93
Add New Post /wp-admin/post-new.php1,532 ▼323.02 ▲4.89651.30 ▲24.2955.61 ▼6.79
Media Library /wp-admin/upload.php1,398 ▲44.20 ▲0.0396.79 ▼1.7842.65 ▼0.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: dni, dni checkout, campo dni woocommerce, woocommere dni

dni-woocommerce/dni-woocommerce.php Passed 13 tests

The entry point to "DNI WooCommerce" version 1.0.9 is a PHP file that has certain tags in its header comment area
45 characters long description:
Add the DNI field in the WooCommerce checkout

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
No dangerous file extensions were detected171 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13018125
PO File1101046

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin