10% simple-calendar-picker

Code Review | Simple Calendar DatePicker

WordPress plugin Simple Calendar DatePicker scored10%from 54 tests.

About plugin

  • Plugin page: simple-calendar-p...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2013
  • Latest release: Oct 9, 2013
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: ranapiyush1986 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

50+ active /5,401 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/simple-calendar-picker/calendar-picker.php+10
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.97MB] [CPU: ▼62.18ms] Passed 4 tests

Analyzing server-side resources used by Simple Calendar DatePicker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.44 ▼37.78
Dashboard /wp-admin2.05 ▼1.305.71 ▼65.57
Posts /wp-admin/edit.php2.05 ▼1.316.24 ▼45.91
Add New Post /wp-admin/post-new.php2.05 ▼3.848.13 ▼99.46
Media Library /wp-admin/upload.php2.05 ▼1.185.31 ▼33.00
Calendar Picker /wp-admin/options-general.php?page=manage_settings2.056.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Calendar DatePicker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6313.21 ▼1.374.80 ▲2.9841.60 ▼0.30
Dashboard /wp-admin2,225 ▲225.89 ▲0.9699.54 ▼11.9239.12 ▼4.76
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0142.64 ▲1.2436.57 ▼3.34
Add New Post /wp-admin/post-new.php1,548 ▲223.14 ▼0.26672.63 ▼15.6762.07 ▲7.10
Media Library /wp-admin/upload.php1,401 ▲44.21 ▼0.0299.43 ▼7.6644.89 ▼0.62
Calendar Picker /wp-admin/options-general.php?page=manage_settings1,4492.0323.3828.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/simple-calendar-picker/calendar-picker.php+10
    Constant WP_DEBUG already defined
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=manage_settings
    • > Notice in wp-content/plugins/simple-calendar-picker/calendar-picker.php+10
    Constant WP_DEBUG already defined
  • 113 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=manage_settings
    • > Notice in wp-content/plugins/simple-calendar-picker/calendar-picker.php+159
    Trying to access array offset on value of type bool

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/simple-calendar-picker/calendar-picker.php:13

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)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === simple-calendar-picker === )
  • Donate link: Invalid url: "(a link for donating)"
The official readme.txt might help

simple-calendar-picker/calendar-picker.php 85% from 13 tests

This is the main PHP file of "Simple Calendar DatePicker" version 1.0.0, 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:
  • Description: The description should be shorter than 140 characters (currently 275 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-calendar-picker.php" instead of "calendar-picker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected144 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11514143
CSS1041

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-lightness/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
css/ui-lightness/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png0.26KB0.12KB▼ 53.44%
css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%