77% horoscope-and-tarot

Code Review | Horoscope And Tarot

WordPress plugin Horoscope And Tarot scored77%from 54 tests.

About plugin

  • Plugin page: horoscope-and-tarot
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.0
  • WordPress version: 6.3.1
  • First release: Aug 3, 2021
  • Latest release: Sep 6, 2023
  • Number of updates: 45
  • Update frequency: every 17.0 days
  • Top authors: divineapi (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active /3,566 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.58MB] [CPU: ▲9.87ms] Passed 4 tests

An overview of server-side resources used by Horoscope And Tarot
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.49 ▲2.0350.97 ▲11.51
Dashboard /wp-admin6.06 ▲2.7664.40 ▲12.39
Posts /wp-admin/edit.php6.18 ▲2.8260.49 ▲11.82
Add New Post /wp-admin/post-new.php8.66 ▲2.78103.13 ▲3.74
Media Library /wp-admin/upload.php5.99 ▲2.7649.79 ▲16.68

Server storage [IO: ▲27.34MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • Try to limit filesystem usage to 25MB (currently using 27.34MB)
Filesystem: 663 new files
Database: no new tables, 66 new options
New WordPress options
daily_panchang_settings_auspi_timings_btn_color_field
daily_panchang_settings_nivas_and_shool_btn_color_field
daily_panchang_settings_in_auspi_timings_btn_color_field
daily_panchang_settings_panchak_and_udaya_show_hide_field
daily_panchang_settings_panchak_and_udaya_btn_color_field
daily_panchang_settings_other_calendar_and_epoch_show_hide_field
daily_panchang_settings_chandra_and_tara_show_hide_field
horoscope_settings_font_size_field
choghadiya_settings_night_choghadiya_text_color_field
kundali_settings_theme_color_field
...

Browser metrics Passed 4 tests

Checking browser requirements for Horoscope And Tarot
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲25114.09 ▼0.138.59 ▲6.8349.39 ▲3.32
Dashboard /wp-admin2,274 ▲955.14 ▼0.72102.72 ▼15.4078.38 ▲32.85
Posts /wp-admin/edit.php2,160 ▲712.47 ▲0.4842.78 ▲5.1735.92 ▲0.55
Add New Post /wp-admin/post-new.php1,733 ▲20022.46 ▼0.61675.95 ▲11.5231.45 ▼21.55
Media Library /wp-admin/upload.php1,456 ▲684.44 ▲0.14116.74 ▲18.9942.29 ▼1.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 66 options
    • daily_panchang_settings_lunar_month_and_samvat_show_hide_field
    • daily_panchang_settings_nivas_and_shool_label_color_field
    • horoscope_buttons_position_field
    • can_compress_scripts
    • daily_panchang_settings_auspi_timings_btn_color_field
    • horoscope_settings_sign_field
    • daily_panchang_settings_lunar_month_and_samvat_btn_color_field
    • daily_panchang_settings_chandra_and_tara_show_hide_field
    • daily_panchang_settings_in_auspi_timings_label_color_field
    • choghadiya_settings_button_text_color_field
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following items
  • 36× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-horoscope-chart-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-nav-pancham-yoga-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-yogini-dasha-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-manglik-analysis-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-horoscope-chart-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-vimshottari-dasha-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-match-making-report-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-ascendant-report-details.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-first-page.php
    • > /wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-first-page.php
  • 1128× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-kp-house-cusps-and-chart-details.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-composite-friendship-details.php on line 92
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-first-page.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-basic-details.php on line 160
    • > PHP Notice
      Undefined variable: lang_type in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-manglik-analysis-details.php on line 16
    • > PHP Notice
      Undefined variable: pt_basic_astro in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-matching-basic-details.php on line 19
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-kp-house-cusps-and-chart-details.php on line 18
    • > PHP Notice
      Undefined variable: ascendant in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-basic-details.php on line 197
    • > PHP Notice
      Undefined variable: bhava_12 in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-bhava-charts-details.php on line 113
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/horoscope-and-tarot/inc/parts/kundali-composite-friendship-details.php on line 54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (37 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please specify the plugin name on the first line ( === horoscope-and-tarot === )
You can take inspiration from this readme.txt

horoscope-and-tarot/horoscope-and-tarot.php Passed 13 tests

The primary PHP file in "Horoscope And Tarot" version 1.1.9 is used by WordPress to initiate all plugin functionality
36 characters long description:
Divine API Horoscope & Tarot Plugin.

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
There were no executable files found in this plugin88,620 lines of code in 430 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript556,7102,77531,466
CSS485,0132,83526,446
PHP1924,3965,97425,352
Markdown171,46703,971
JSON10001,034
SVG10801351

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.61
▷ Minimum class complexity1.00
▷ Maximum class complexity270.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes79
▷ Abstract classes00.00%
▷ Concrete classes79100.00%
▷ Final classes3544.30%
Methods792
▷ Static methods14818.69%
▷ Public methods67485.10%
▷ Protected methods40.51%
▷ Private methods11414.39%
Functions368
▷ Named functions27875.54%
▷ Anonymous functions9024.46%
Constants67
▷ Global constants34.48%
▷ Class constants6495.52%
▷ Public constants5382.81%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
132 PNG files occupy 4.33MB with 1.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/zodiac/Libra.png18.45KB18.44KB0.05%
public/images/zodiac/Pisces-1.png10.10KB10.10KB0.00%
admin/colorpicker/images/colorpicker_background.png1.85KB2.14KB0.00%
public/images/kundali/sadhesati.png130.56KB36.90KB▼ 71.74%
public/images/kundali/header_title.png2.20KB0.59KB▼ 73.14%