83% cod-default-status-for-woocommerce

Code Review | COD Default Status for WooCommerce

WordPress plugin COD Default Status for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: cod-default-statu...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.3
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: Nov 17, 2019
  • Number of updates: 5
  • Update frequency: every 42.6 days
  • Top authors: woofx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,388 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.05ms] Passed 4 tests

A check of server-side resources used by COD Default Status for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0747.51 ▲6.43
Dashboard /wp-admin3.36 ▲0.0649.05 ▼0.63
Posts /wp-admin/edit.php3.47 ▲0.1248.25 ▲1.81
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.90 ▼11.29
Media Library /wp-admin/upload.php3.28 ▲0.0637.05 ▲5.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by COD Default Status for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.111.82 ▲0.1544.39 ▲0.07
Dashboard /wp-admin2,203 ▲155.77 ▼0.0897.62 ▼5.9638.90 ▼3.52
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0041.03 ▲0.6535.10 ▼0.81
Add New Post /wp-admin/post-new.php1,537 ▼023.23 ▼0.12692.27 ▲33.8455.52 ▲2.52
Media Library /wp-admin/upload.php1,388 ▲64.26 ▲0.0296.63 ▼2.8041.30 ▼1.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/cod-default-status-for-woocommerce/admin/partials/cod-default-status-for-woocommerce-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI ("woofx.kaizenflow.xyz")
Please take inspiration from this readme.txt

cod-default-status-for-woocommerce/cod-default-status-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "COD Default Status for WooCommerce" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.8" instead of "3.0.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin239 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8123438239

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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