77% chp-nepali-date-converter

Code Review | CHP Nepali Date Converter

WordPress plugin CHP Nepali Date Converter scored77%from 54 tests.

About plugin

  • Plugin page: chp-nepali-date-c...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-4.8
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Sep 24, 2020
  • Number of updates: 5
  • Update frequency: every 4.4 days
  • Top authors: sureshchand00a (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.44ms] Passed 4 tests

An overview of server-side resources used by CHP Nepali Date Converter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.70 ▲1.68
Dashboard /wp-admin3.33 ▲0.0347.80 ▼1.14
Posts /wp-admin/edit.php3.38 ▲0.0347.81 ▲0.92
Add New Post /wp-admin/post-new.php5.93 ▲0.05100.66 ▲4.34
Media Library /wp-admin/upload.php3.26 ▲0.0333.04 ▼3.21
CHP Nepali Date Converter /wp-admin/options-general.php?page=chp-nepali-date-converter3.4836.77

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

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

Browser metrics Passed 4 tests

CHP Nepali Date Converter: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.27 ▼1.132.05 ▲0.2543.72 ▼0.10
Dashboard /wp-admin2,208 ▲235.89 ▲0.0298.29 ▼6.4342.30 ▼3.03
Posts /wp-admin/edit.php2,097 ▲82.06 ▲0.0239.95 ▼1.3339.56 ▲1.50
Add New Post /wp-admin/post-new.php1,521 ▼2123.40 ▲4.92642.65 ▲52.2458.31 ▲6.46
Media Library /wp-admin/upload.php1,396 ▲84.26 ▲0.0397.58 ▼2.9945.00 ▲1.13
CHP Nepali Date Converter /wp-admin/options-general.php?page=chp-nepali-date-converter1,0212.0627.8272.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_chpdate_widget
    • widget_chpdate_widget_theme
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/chp-nepali-date-converter/chpnpdate.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/chp-nepali-date-converter/inc/CHPDATETIME_WIDGET.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/chp-nepali-date-converter/inc/main.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/chp-nepali-date-converter/inc/CHPDATETIME_WIDGET_THEME.class.php:7

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 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

chp-nepali-date-converter/chpnpdate.php 69% from 13 tests

This is the main PHP file of "CHP Nepali Date Converter" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("chp-nepali-date-converter.php" instead of "chpnpdate.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "5.2")
  • Description: Please keep the plugin description shorter than 140 characters (currently 344 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,177 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5138200954
CSS1240201
JavaScript13522

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity32.25
▷ Minimum class complexity4.00
▷ Maximum class complexity70.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods1851.43%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin