89% nepali-calendar

Code Review | Nepali Calendar

WordPress plugin Nepali Calendar scored89%from 54 tests.

About plugin

  • Plugin page: nepali-calendar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.0
  • WordPress version: 6.3.1
  • First release: Aug 12, 2017
  • Latest release: Aug 12, 2017
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: themeegg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.31MB] [CPU: ▼2.30ms] Passed 4 tests

Server-side resources used by Nepali Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3539.79 ▲0.51
Dashboard /wp-admin3.64 ▲0.3457.79 ▲6.80
Posts /wp-admin/edit.php3.69 ▲0.3351.80 ▼0.50
Add New Post /wp-admin/post-new.php6.18 ▲0.2992.45 ▼8.70
Media Library /wp-admin/upload.php3.50 ▲0.2738.02 ▼0.50

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 69 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
nepali_calendar_db_version
widget_nepali_calendar_widget
can_compress_scripts
db_upgraded
widget_recent-posts
nepali_calendar_version
widget_recent-comments
nepali_calendar_admin_notices

Browser metrics Passed 4 tests

A check of browser resources used by Nepali Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲14413.78 ▼0.598.89 ▲7.2445.58 ▲3.76
Dashboard /wp-admin2,195 ▲255.59 ▲0.0586.02 ▼15.5640.11 ▼4.64
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0436.93 ▲0.5333.51 ▼5.08
Add New Post /wp-admin/post-new.php1,535 ▲718.02 ▼5.08677.01 ▼11.8575.00 ▲21.34
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.1198.09 ▼20.2641.45 ▼9.08

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
These items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • nepali_calendar_version
    • can_compress_scripts
    • nepali_calendar_db_version
    • db_upgraded
    • widget_recent-posts
    • nepali_calendar_admin_notices
    • widget_recent-comments
    • widget_nepali_calendar_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Widgets), #2 (Frontend view)
  • Plugin Name: Please specify the plugin name on the first line ( === nepali-calendar === )
The official readme.txt is a good inspiration

nepali-calendar/nepali-calendar.php 92% from 13 tests

Analyzing the main PHP file in "Nepali Calendar" version 1.0.0
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "4.0")

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
There were no executable files found in this plugin4,792 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP368591,6902,524
Sass919301,545
JavaScript842638719
CSS4004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.38
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes417.39%
▷ Concrete classes1982.61%
▷ Final classes15.26%
Methods175
▷ Static methods7140.57%
▷ Public methods12370.29%
▷ Protected methods2112.00%
▷ Private methods3117.71%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/next.png1.94KB0.63KB▼ 67.24%
assets/images/next_hover.png1.86KB0.62KB▼ 66.79%
assets/images/border.png0.14KB0.16KB0.00%
assets/images/controls.png1.98KB2.04KB0.00%
assets/images/prev_hover.png1.95KB0.63KB▼ 67.90%