79% nepali-date-converter

Code Review | Nepali Date Converter

WordPress plugin Nepali Date Converter scored79%from 54 tests.

About plugin

  • Plugin page: nepali-date-conve...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Sep 26, 2015
  • Latest release: Feb 24, 2022
  • Number of updates: 12
  • Update frequency: every 195.3 days
  • Top authors: addonspress (75%)codersantosh (33.33%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /6,584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼1.16ms] Passed 4 tests

Server-side resources used by Nepali Date Converter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3842.44 ▲3.06
Dashboard /wp-admin3.68 ▲0.3849.75 ▲3.66
Posts /wp-admin/edit.php3.79 ▲0.4446.26 ▲0.98
Add New Post /wp-admin/post-new.php6.26 ▲0.3891.68 ▼12.34
Media Library /wp-admin/upload.php3.60 ▲0.3836.61 ▲5.40

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_widget_nepali_date_converter
can_compress_scripts
widget_recent-posts
widget_widget_ndc_today
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nepali Date Converter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.35 ▼1.021.76 ▲0.0344.43 ▲2.15
Dashboard /wp-admin2,203 ▲155.76 ▼0.0897.47 ▼6.6038.14 ▼3.38
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0134.85 ▲0.2332.24 ▼2.70
Add New Post /wp-admin/post-new.php1,542 ▲918.53 ▼4.84623.89 ▼41.9450.69 ▼15.22
Media Library /wp-admin/upload.php1,391 ▲94.22 ▲0.04100.14 ▼2.4143.74 ▼1.76

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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_widget_ndc_today
    • widget_widget_nepali_date_converter
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/nepali-date-converter/inc/widgets/widget-today-date.php
    • > /wp-content/plugins/nepali-date-converter/inc/widgets/widget-nepali-date-converter.php
    • > /wp-content/plugins/nepali-date-converter/nepali-date-converter.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nepali-date-converter/inc/hooks/wp-ajax.php:2
    • > PHP Warning
      require_once(NEPALI_DATE_CONVERTER_PATHinc/frameworks/nepali-calendar/nepali_calendar.php): failed to open stream: No such file or directory in wp-content/plugins/nepali-date-converter/inc/init.php on line 5
    • > PHP Warning
      Use of undefined constant NEPALI_DATE_CONVERTER_PATH - assumed 'NEPALI_DATE_CONVERTER_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nepali-date-converter/inc/init.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nepali-date-converter/inc/shortcode/shortcode-nepali-date-converter.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nepali-date-converter/inc/class/ndc-post-date.php:91
    • > PHP Fatal error
      require_once(): Failed opening required 'NEPALI_DATE_CONVERTER_PATHinc/frameworks/nepali-calendar/nepali_calendar.php' (include_path='.:/usr/share/php') in wp-content/plugins/nepali-date-converter/inc/init.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nepali-date-converter/inc/shortcode/shortcode-today-date.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
10 plugin tags: nepali post date, nepal, nepali date converter, english to nepali date converter, post date nepal...

nepali-date-converter/nepali-date-converter.php Passed 13 tests

This is the main PHP file of "Nepali Date Converter" version 2.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
75 characters long description:
Convert English to Nepali Date and Vice Versa and Post Date to Nepali Date.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,932 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP142736891,932

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity31.60
▷ Minimum class complexity17.00
▷ Maximum class complexity49.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods37.32%
▷ Public methods3790.24%
▷ Protected methods00.00%
▷ Private methods49.76%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected