78% bangla-date-display

Code Review | Bangla Date Display

WordPress plugin Bangla Date Display scored78%from 54 tests.

About plugin

  • Plugin page: bangla-date-display
  • Plugin version: 9.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 15, 2012
  • Latest release: Apr 6, 2023
  • Number of updates: 93
  • Update frequency: every 41.8 days
  • Top authors: imran2w (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

5,000+ active /58,248 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.50ms] Passed 4 tests

A check of server-side resources used by Bangla Date Display
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.12 ▼8.75
Dashboard /wp-admin3.32 ▲0.0244.06 ▼6.20
Posts /wp-admin/edit.php3.38 ▲0.0243.93 ▼1.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.08 ▼9.09
Media Library /wp-admin/upload.php3.25 ▲0.0242.12 ▲6.62
Bangla Date Display /wp-admin/options-general.php?page=bangla-date-display3.2131.37

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Bangla Date Display
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲11813.53 ▼0.859.01 ▲7.1051.57 ▲8.85
Dashboard /wp-admin2,213 ▲254.84 ▼0.97111.97 ▼1.9440.35 ▼3.89
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0442.18 ▲5.1035.43 ▼0.27
Add New Post /wp-admin/post-new.php1,536 ▲223.18 ▼0.07640.10 ▼28.4064.26 ▲6.70
Media Library /wp-admin/upload.php1,389 ▲14.18 ▼0.04101.89 ▼8.8146.85 ▼2.89
Bangla Date Display /wp-admin/options-general.php?page=bangla-date-display1,7172.0627.9546.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_bddp_ac_widget
    • widget_recent-comments
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bangla-date-display/uninstall.php
    • > /wp-content/plugins/bangla-date-display/bddp_admin.php
    • > /wp-content/plugins/bangla-date-display/bangla-date-display.php
    • > /wp-content/plugins/bangla-date-display/uCal.php
    • > /wp-content/plugins/bangla-date-display/translator.php
    • > /wp-content/plugins/bangla-date-display/class.banglaDate.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bangla-date-display/ajax-archive-calendar.php:6

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Main Widget.), #2 (Time and Date.), #3 (Advanced Archive Calendar Widget.), #4 (Settings Page.)
Please take inspiration from this readme.txt

bangla-date-display/bangla-date-display.php 92% from 13 tests

"Bangla Date Display" version 9.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 191 characters long)

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 plugin2,259 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP72551831,961
JavaScript12214267
CSS15031

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 115)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity53.00
▷ Minimum class complexity14.00
▷ Maximum class complexity127.00
Average method complexity9.21
▷ Minimum method complexity1.00
▷ Maximum method complexity115.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.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 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.00KB7.79KB▼ 40.10%
screenshot-3.png8.18KB4.67KB▼ 42.89%
screenshot-4.png107.86KB52.63KB▼ 51.21%
screenshot-2.png2.55KB2.19KB▼ 14.11%