10% hukamnama

Code Review | Hukamnama

WordPress plugin Hukamnama scored 10% from 53 tests.

About plugin

  • Plugin page: hukamnama
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 5.8.1
  • First release: Feb 16, 2017
  • Latest release: Feb 16, 2017
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: inderpreet99 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 522 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/hukamnama/hukamnama.php+54
    Undefined variable: default_api

Server metrics [RAM: ▼0.83MB] [CPU: ▼298.42ms] Passed 4 tests

An overview of server-side resources used by Hukamnama
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1334.70 ▲13.36
Dashboard /wp-admin2.82 ▼0.2422.89 ▼16.28
Posts /wp-admin/edit.php2.82 ▼0.2926.37 ▼14.39
Add New Post /wp-admin/post-new.php2.82 ▼2.6121.37 ▼1,146.90
Media Library /wp-admin/upload.php2.82 ▼0.1921.21 ▼16.09
Settings /wp-admin/admin.php?page=hukamnama-settings2.8218.02
Hukamnama /wp-admin/admin.php?page=hukamnama2.8223.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options
hukamnama_api

Browser metrics Passed 4 tests

Hukamnama: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,848 ▲24216.63 ▲1.0110.32 ▲1.8050.56 ▲0.05
Dashboard /wp-admin2,993 ▲1406.13 ▲0.27141.72 ▼17.28113.52 ▲12.02
Posts /wp-admin/edit.php2,740 ▲372.70 ▼0.0072.01 ▲9.05104.03 ▲12.14
Add New Post /wp-admin/post-new.php1,503 ▼35416.89 ▼2.22356.10 ▼10.33105.83 ▲1.76
Media Library /wp-admin/upload.php1,806 ▲345.01 ▼0.01149.47 ▼2.11119.19 ▲9.94
Settings /wp-admin/admin.php?page=hukamnama-settings1,0862.1156.0466.11
Hukamnama /wp-admin/admin.php?page=hukamnama1,1592.3657.6670.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/hukamnama/hukamnama.php+122
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 1 option
    • hukamnama_api

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hukamnama
    • > Deprecated in wp-content/plugins/hukamnama/hukamnama.php+123
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=hukamnama-settings
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method Hukamnama::settings_page() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hukamnama
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hukamnama
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=hukamnama
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method Hukamnama::select_page() should not be called statically

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/hukamnama/interface/shortcode.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant HOUR_IN_SECONDS - assumed 'HOUR_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/hukamnama/hukamnama.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/hukamnama/hukamnama.php:32
    • > PHP Warning
      A non-numeric value encountered in wp-content/plugins/hukamnama/hukamnama.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/hukamnama/interface/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/hukamnama/interface/select-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: hukamnama, sikhism, sikh, shortcode, gurbani...

hukamnama/hukamnama.php Passed 13 tests

The main PHP script in "Hukamnama" version 0.5 is automatically included on every request by WordPress
42 characters long description:
Display today's hukamnama using Sikher API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected437 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4409198
JavaScript2445184
CSS29055

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods857.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin