10% bhutanese-calendar

Code Review | Bhutanese Calendar

WordPress plugin Bhutanese Calendar scored10%from 54 tests.

About plugin

  • Plugin page: bhutanese-calendar
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.1
  • WordPress version: 6.3.1
  • First release: May 6, 2014
  • Latest release: Jan 7, 2016
  • Number of updates: 39
  • Update frequency: every 15.7 days
  • Top authors: sangay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,203 total downloads

Benchmarks

Plugin footprint 58% 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
    • > Parse error in wp-content/plugins/bhutanese-calendar/bhutanesecalendar.php+346
    syntax error, unexpected '}', expecting end of file

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

An overview of server-side resources used by Bhutanese Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.95 ▼2.91
Dashboard /wp-admin3.31 ▲0.0050.31 ▲5.28
Posts /wp-admin/edit.php3.36 ▲0.0045.64 ▼0.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.23 ▼9.77
Media Library /wp-admin/upload.php3.23 ▲0.0034.69 ▲0.37

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Bhutanese Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.081.57 ▼0.0842.61 ▲1.30
Dashboard /wp-admin2,192 ▲155.49 ▼0.1982.25 ▼9.0137.85 ▼2.29
Posts /wp-admin/edit.php2,097 ▼31.97 ▲0.0234.02 ▼2.7836.92 ▲6.33
Add New Post /wp-admin/post-new.php1,539 ▲1323.25 ▲0.22635.13 ▼15.7156.68 ▲1.24
Media Library /wp-admin/upload.php1,394 ▼34.18 ▲0.0195.83 ▼10.3941.97 ▼3.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bhutanese-calendar/trunk/admin/admin.php:10
    • > PHP Notice
      Undefined variable: bt_month in wp-content/plugins/bhutanese-calendar/includes/dzongkha_month.php on line 2
    • > PHP Notice
      Undefined variable: bt_date in wp-content/plugins/bhutanese-calendar/includes/dzongkha_dates.php on line 2
    • > PHP Notice
      Undefined offset: 1 in wp-content/plugins/bhutanese-calendar/includes/dzongkha_year.php on line 60
    • > PHP Notice
      Undefined variable: bt_secondyear in wp-content/plugins/bhutanese-calendar/includes/dzongkha_year.php on line 34
    • > PHP Notice
      Undefined offset: 2 in wp-content/plugins/bhutanese-calendar/trunk/includes/dzongkha_year.php on line 46
    • > PHP Notice
      Undefined variable: bt_month in wp-content/plugins/bhutanese-calendar/trunk/includes/dzongkha_month.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bhutanese-calendar/widget/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bhutanese-calendar/trunk/shortcode/shortcode.php:12
    • > PHP Notice
      Undefined variable: bt_secondyear in wp-content/plugins/bhutanese-calendar/trunk/includes/dzongkha_year.php on line 34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: bhutan calendar, bhutanese calendar

bhutanese-calendar/bhutanesecalendar.php 92% from 13 tests

Analyzing the main PHP file in "Bhutanese Calendar" version 1.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bhutanese-calendar.php" instead of "bhutanesecalendar.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
Everything looks great! No dangerous files found in this plugin2,047 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript114137832
PHP8106117782
SVG100245
CSS11947179
HTML1309

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/jscolor/hs.png2.62KB7.54KB0.00%
trunk/admin/js/jscolor/hs.png2.62KB7.54KB0.00%
admin/js/jscolor/hv.png2.80KB7.32KB0.00%
trunk/admin/js/jscolor/hv.png2.80KB7.32KB0.00%