78% order-calendar-for-woocommerce

Code Review | Order Calendar for WooCommerce

WordPress plugin Order Calendar for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: order-calendar-fo...
  • Plugin version: 1.6.24
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: Feb 1, 2020
  • Latest release: Dec 1, 2023
  • Number of updates: 124
  • Update frequency: every 11.3 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /13,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.02ms] Passed 4 tests

A check of server-side resources used by Order Calendar for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.69 ▼2.61
Dashboard /wp-admin3.32 ▼0.0345.26 ▼14.14
Posts /wp-admin/edit.php3.37 ▲0.0145.56 ▼5.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.28 ▼14.10
Media Library /wp-admin/upload.php3.24 ▲0.0135.25 ▼1.02

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Order Calendar for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.67 ▲0.281.72 ▲0.1338.35 ▲1.87
Dashboard /wp-admin2,201 ▲235.57 ▼0.1590.64 ▼18.1843.37 ▲2.82
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0139.67 ▼1.8135.36 ▼2.54
Add New Post /wp-admin/post-new.php1,532 ▲623.20 ▼0.05669.23 ▼18.5854.71 ▼8.76
Media Library /wp-admin/upload.php1,406 ▲34.21 ▲0.05103.37 ▼1.8540.35 ▼6.24

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/order-calendar-for-woocommerce/admin/partials/missing-date-time-plugin.php
    • > /wp-content/plugins/order-calendar-for-woocommerce/includes/pisol.class.form.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/order-calendar-for-woocommerce/includes/includes.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/order-calendar-for-woocommerce/admin/class-pisol-dtt-edd-advance.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/order-calendar-for-woocommerce/includes/banner-sample.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/order-calendar-for-woocommerce/includes/class-enable-meta-query.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/order-calendar-for-woocommerce/admin/class-pisol-dtt-edd-calendar-admin-calendar.php:55
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/order-calendar-for-woocommerce/admin/class-pisol-dtt-edd-calendar-access.php:103

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "piwebsolution.com"
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #2, #3, #4, #6, #7, #9 in order-calendar-for-woocommerce/assets to your readme.txt
The official readme.txt is a good inspiration

order-calendar-for-woocommerce/order-calendar-for-woocommerce.php Passed 13 tests

"Order Calendar for WooCommerce" version 1.6.24's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
34 characters long description:
Show orders received on a calendar

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
There were no executable files found in this plugin3,230 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP284313001,521
SVG55351,049
CSS49025614
JavaScript3113046

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.28
Average class complexity8.14
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods123
▷ Static methods86.50%
▷ Public methods11391.87%
▷ Protected methods00.00%
▷ Private methods108.13%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants6
▷ Global constants6100.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
7 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/total-product.png40.38KB13.71KB▼ 66.05%
admin/img/pi.png1.48KB1.11KB▼ 24.83%
admin/img/pi-web-solution.png21.25KB9.42KB▼ 55.67%
admin/img/time.png31.46KB9.72KB▼ 69.11%
includes/background.png74.27KB26.29KB▼ 64.60%