84% bangla-date-and-time

Code Review | Bangla Date and Time

WordPress plugin Bangla Date and Time scored 84% from 54 tests.

About plugin

  • Plugin page: bangla-date-and-time
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2.2
  • WordPress version: 5.8.1
  • First release: May 11, 2011
  • Latest release: Jul 7, 2015
  • Number of updates: 112
  • Update frequency: every 13.7 days
  • Top authors: mitcmt (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 16,284 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼136.63ms] Passed 4 tests

This is a short check of server-side resources used by Bangla Date and Time
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.09 ▲0.3737.02 ▲14.63
Dashboard /wp-admin3.32 ▲0.2647.27 ▼0.21
Posts /wp-admin/edit.php3.42 ▲0.3248.47 ▲3.65
Add New Post /wp-admin/post-new.php5.68 ▲0.2599.58 ▼547.40
Media Library /wp-admin/upload.php3.26 ▲0.2534.10 ▼2.55

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
widget_bangla_date

Browser metrics Passed 4 tests

An overview of browser requirements for Bangla Date and Time
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.92 ▲0.598.53 ▼2.6447.14 ▲3.55
Dashboard /wp-admin2,992 ▲585.94 ▼0.09143.39 ▼22.73121.15 ▲16.02
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0068.37 ▲3.97103.50 ▲10.54
Add New Post /wp-admin/post-new.php1,615 ▼6821.40 ▲3.18291.45 ▼126.27103.90 ▼4.82
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.03147.72 ▼43.52117.59 ▼12.38

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
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_bangla_date

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bangla-date-and-time/classes/class-bangla-date.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bangla-date-and-time/core.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bangla-date-and-time/bangla-date-and-time.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bangla-date-and-time/classes/class-date-widget.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: bongabdo, hijri, bangla, gregorian, widget...

bangla-date-and-time/bangla-date-and-time.php Passed 13 tests

"Bangla Date and Time" version 2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
67 characters long description:
Bangla Date and Time simply converts all date and time into Bangla.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected687 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5105329455
XML1100232

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1157.89%
▷ Protected methods00.00%
▷ Private methods842.11%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin