84% hamro-nepali-patro-calendar

Code Review | Hamro Patro

WordPress plugin Hamro Patro scored84%from 54 tests.

About plugin

  • Plugin page: hamro-nepali-patr...
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2020
  • Latest release: Jun 22, 2023
  • Number of updates: 26
  • Update frequency: every 45.8 days
  • Top authors: arunpyasi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,850 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.96ms] Passed 4 tests

Analyzing server-side resources used by Hamro Patro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0440.84 ▼5.66
Dashboard /wp-admin3.39 ▲0.0449.58 ▼6.38
Posts /wp-admin/edit.php3.50 ▲0.1049.40 ▼0.81
Add New Post /wp-admin/post-new.php5.97 ▲0.0491.27 ▼11.36
Media Library /wp-admin/upload.php3.31 ▲0.0432.46 ▼4.44

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
widget_hamropatro_date_converter_widget
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_hamropatro_calendar_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Hamro Patro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.421.76 ▼0.0241.59 ▼2.25
Dashboard /wp-admin2,192 ▲155.53 ▼0.13110.12 ▲16.9038.45 ▼4.73
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0039.62 ▼2.3233.98 ▼1.41
Add New Post /wp-admin/post-new.php1,526 ▼723.67 ▲0.64675.22 ▲13.1252.21 ▲2.30
Media Library /wp-admin/upload.php1,403 ▼04.22 ▼0.0596.40 ▼17.9847.70 ▲1.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_hamropatro_date_converter_widget
    • widget_hamropatro_calendar_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× 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/hamro-nepali-patro-calendar/dateconverter.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hamro-nepali-patro-calendar/calendar.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hamro-nepali-patro-calendar/calendar.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: hamro, nepali, calendar, nepali calendar, hamro patro...

hamro-nepali-patro-calendar/hamropatro.php 92% from 13 tests

The main PHP script in "Hamro Patro" version 1.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hamro-nepali-patro-calendar.php" instead of "hamropatro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin135 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44541135

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected