84% date-today-nepali

Code Review | Date Today Nepali

WordPress plugin Date Today Nepali scored84%from 54 tests.

About plugin

  • Plugin page: date-today-nepali
  • Plugin version: 2.5.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Oct 24, 2013
  • Latest release: Aug 2, 2023
  • Number of updates: 98
  • Update frequency: every 36.4 days
  • Top authors: rabmalin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /9,667 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.31ms] Passed 4 tests

This is a short check of server-side resources used by Date Today Nepali
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.52 ▼5.07
Dashboard /wp-admin3.35 ▲0.0546.43 ▼1.99
Posts /wp-admin/edit.php3.47 ▲0.1150.35 ▲4.28
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.51 ▼10.44
Media Library /wp-admin/upload.php3.28 ▲0.0539.59 ▲5.11
Date Today Nepali /wp-admin/options-general.php?page=date-today-nepali-welcome3.4234.44

Server storage [IO: ▲0.25MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_dtn-date-display-widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Date Today Nepali
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.53 ▼1.081.66 ▼0.0841.54 ▲1.38
Dashboard /wp-admin2,214 ▲345.80 ▲0.84106.49 ▼5.7438.13 ▼4.24
Posts /wp-admin/edit.php2,097 ▲82.06 ▲0.0540.14 ▲4.5938.27 ▲4.78
Add New Post /wp-admin/post-new.php6,315 ▲4,78727.27 ▲9.15825.94 ▲204.4235.75 ▼30.03
Media Library /wp-admin/upload.php1,399 ▲144.21 ▼0.0999.00 ▲1.0541.78 ▼0.61
Date Today Nepali /wp-admin/options-general.php?page=date-today-nepali-welcome1,0482.5563.2131.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 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 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_dtn-date-display-widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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 everything seems fine, this is not 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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/date-today-nepali/app/Widgets/Dtn.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nilambar\\Welcome\\add_action() in wp-content/plugins/date-today-nepali/vendor/ernilambar/wp-welcome/init.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
4 plugin tags: classicpress, date, nepali, widget

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

Analyzing the main PHP file in "Date Today Nepali" version 2.5.5
45 characters long description:
A small widget plugin to display Nepali date.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,057 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP306681,5512,729
JSON500276
Markdown220033
JavaScript30018
CSS1001

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.42
Average class complexity19.15
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes15.00%
Methods152
▷ Static methods4529.61%
▷ Public methods12481.58%
▷ Protected methods106.58%
▷ Private methods1811.84%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants14
▷ Global constants1285.71%
▷ Class constants214.29%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin