90% date-price-calendar

Code Review | Date Price Calendar for WooCommerce

WordPress plugin Date Price Calendar for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: date-price-calendar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: May 18, 2019
  • Latest release: Feb 23, 2022
  • Number of updates: 9
  • Update frequency: every 112.5 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,446 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.00MB] [CPU: ▼1.38ms] Passed 4 tests

Analyzing server-side resources used by Date Price Calendar for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.40 ▲1.16
Dashboard /wp-admin3.31 ▲0.0052.25 ▲1.05
Posts /wp-admin/edit.php3.36 ▲0.0047.41 ▼5.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.16 ▼2.08
Media Library /wp-admin/upload.php3.23 ▲0.0036.35 ▲2.80

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Date Price Calendar for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.421.70 ▼0.0740.90 ▼3.62
Dashboard /wp-admin2,195 ▲155.51 ▼0.0984.22 ▼3.4339.55 ▼2.96
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0637.87 ▲0.1335.00 ▼2.58
Add New Post /wp-admin/post-new.php1,526 ▼221.11 ▼2.01690.29 ▼26.3951.66 ▼3.32
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.14108.51 ▲2.6744.13 ▼2.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

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: date product option, calendar product option, price per date, available date ranges

date-price-calendar/date-price-calendar.php Passed 13 tests

The main PHP file in "Date Price Calendar for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
Product option that displays a calendar. Each date can have different price.

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
No dangerous file extensions were detected951 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP1728720756
JavaScript2550146
CSS3322049

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.15
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods71
▷ Static methods45.63%
▷ Public methods6794.37%
▷ Protected methods00.00%
▷ Private methods45.63%
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

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
view/frontend/web/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
view/frontend/web/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
view/adminhtml/web/product/edit/text_field_option.png54.53KB14.16KB▼ 74.04%
view/frontend/web/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.31KB0.18KB▼ 42.95%
view/frontend/web/images/ui-bg_glass_75_dadada_1x400.png0.29KB0.16KB▼ 46.84%