83% vedicastroapi

Code Review | VedicAstroAPI

WordPress plugin VedicAstroAPI scored83%from 54 tests.

About plugin

  • Plugin page: vedicastroapi
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Aug 8, 2023
  • Number of updates: 10
  • Update frequency: every 15.4 days
  • Top authors: vedicastroapiadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.42MB] [CPU: ▲3.29ms] Passed 4 tests

A check of server-side resources used by VedicAstroAPI
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4547.75 ▲4.94
Dashboard /wp-admin4.75 ▲1.4554.66 ▲0.15
Posts /wp-admin/edit.php4.81 ▲1.4554.68 ▲0.36
Add New Post /wp-admin/post-new.php7.29 ▲1.40113.42 ▲7.71
Media Library /wp-admin/upload.php4.62 ▲1.3855.15 ▲20.55

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 120 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
vedicastro_setting

Browser metrics Passed 4 tests

An overview of browser requirements for VedicAstroAPI
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20313.52 ▼0.7610.40 ▲8.6636.85 ▼6.71
Dashboard /wp-admin2,234 ▲635.67 ▲0.1083.95 ▼7.8366.36 ▲26.07
Posts /wp-admin/edit.php2,139 ▲392.03 ▲0.0736.60 ▲0.1834.52 ▲0.26
Add New Post /wp-admin/post-new.php1,717 ▲18922.14 ▼0.78739.65 ▲104.0456.66 ▲6.34
Media Library /wp-admin/upload.php1,433 ▲364.22 ▲0.04104.95 ▼5.1180.10 ▲37.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • vedicastro_setting
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/vedicastroapi/public/partials/vedic-astro-api-public-display.php
    • > /wp-content/plugins/vedicastroapi/admin/partials/vedic-astro-api-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

vedicastroapi/vedic-astro-api.php 85% from 13 tests

This is the main PHP file of "VedicAstroAPI" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("vedicastroapi.php" instead of "vedic-astro-api.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin17,397 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP131,8691,0926,366
CSS6772816,358
JavaScript46295054,328
SVG25012345

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity114.00
▷ Minimum class complexity1.00
▷ Maximum class complexity583.00
Average method complexity7.28
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods144
▷ Static methods21.39%
▷ Public methods13996.53%
▷ Protected methods00.00%
▷ Private methods53.47%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
59 PNG files occupy 0.35MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/horoscope.png2.50KB1.61KB▼ 35.47%
public/images/planet/image-6.png6.44KB2.48KB▼ 61.46%
public/images/panchang.png1.01KB0.63KB▼ 37.83%
public/images/moon/newmoon.png4.91KB3.39KB▼ 30.96%
public/images/planet/jupiter.png20.43KB6.58KB▼ 67.76%