89% pfand-deposit-for-woocommerce-products

Code Review | Pfand (Deposit) for WooCommerce Products

WordPress plugin Pfand (Deposit) for WooCommerce Products scored89%from 54 tests.

About plugin

  • Plugin page: pfand-deposit-for...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 20, 2017
  • Latest release: Feb 20, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jessekeys (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /3,197 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.18ms] Passed 4 tests

A check of server-side resources used by Pfand (Deposit) for WooCommerce Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.57 ▼2.38
Dashboard /wp-admin3.39 ▲0.0953.40 ▼0.41
Posts /wp-admin/edit.php3.51 ▲0.1554.66 ▼1.52
Add New Post /wp-admin/post-new.php5.97 ▲0.0992.58 ▼8.41
Media Library /wp-admin/upload.php3.32 ▲0.0940.48 ▲7.99

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

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/pfand-deposit-for-woocommerce-products/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pfand (Deposit) for WooCommerce Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.58 ▼0.722.28 ▲0.4345.62 ▲3.05
Dashboard /wp-admin2,221 ▲185.85 ▼0.05108.53 ▲3.1044.33 ▲2.50
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0240.65 ▼0.8137.18 ▼3.50
Add New Post /wp-admin/post-new.php1,545 ▲1423.26 ▲0.05674.62 ▲64.4551.06 ▼16.43
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.08100.85 ▼5.8741.49 ▼3.40

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 detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

pfand-deposit-for-woocommerce-products/woo-pfand.php 85% from 13 tests

"Pfand (Deposit) for WooCommerce Products" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pfand-deposit-for-woocommerce-products.php" instead of "woo-pfand.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected393 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10149480296
PO File1303197

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods412.90%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin