10% shop-calendar

Code Review | Shop Calendar

WordPress plugin Shop Calendar scored10%from 54 tests.

About plugin

  • Plugin page: shop-calendar
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Apr 29, 2016
  • Latest release: Oct 15, 2019
  • Number of updates: 12
  • Update frequency: every 105.3 days
  • Top authors: issey7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,239 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/shop-calendar/shop-calendar.php+29
    Function create_function() is deprecated

Server metrics [RAM: ▼1.41MB] [CPU: ▼61.49ms] Passed 4 tests

An overview of server-side resources used by Shop Calendar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.59 ▼0.888.07 ▼39.69
Dashboard /wp-admin2.61 ▼0.748.96 ▼58.34
Posts /wp-admin/edit.php2.61 ▼0.758.44 ▼45.03
Add New Post /wp-admin/post-new.php2.61 ▼3.288.97 ▼102.91
Media Library /wp-admin/upload.php2.61 ▼0.626.86 ▼27.45
Shop Calendar設定 /wp-admin/options-general.php?page=shop_calendar2.618.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_shopcalendar
db_upgraded
shop_calendar
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Shop Calendar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲2414.34 ▼0.221.72 ▼0.0744.22 ▲4.12
Dashboard /wp-admin2,199 ▲255.65 ▲0.0684.80 ▼3.9541.12 ▼5.00
Posts /wp-admin/edit.php2,107 ▲41.97 ▲0.0134.57 ▼9.1038.62 ▲1.65
Add New Post /wp-admin/post-new.php1,531 ▲522.87 ▼0.17682.28 ▲8.5957.02 ▼3.07
Media Library /wp-admin/upload.php1,407 ▲74.22 ▼0.0194.40 ▼16.7145.54 ▼1.08
Shop Calendar設定 /wp-admin/options-general.php?page=shop_calendar3,5292.0225.6567.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/shop-calendar/shop-calendar.php+29
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_shopcalendar

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=shop_calendar
    • > Deprecated in wp-content/plugins/shop-calendar/shop-calendar.php+29
    Function create_function() is deprecated

SRP 50% from 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
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 register_activation_hook() in wp-content/plugins/shop-calendar/shop-calendar.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: widget, calendar

shop-calendar/shop-calendar.php Passed 13 tests

The primary PHP file in "Shop Calendar" version 1.7.1 is used by WordPress to initiate all plugin functionality
102 characters long description:
店舗向けのカレンダーで、店休日をウェジットに表示するプラグインです。

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,529 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1124501,484
CSS11045

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity169.50
▷ Minimum class complexity4.00
▷ Maximum class complexity335.00
Average method complexity11.21
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods3090.91%
▷ Protected methods00.00%
▷ Private methods39.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin