84% vachana-sanchaya-daily-vachana

Code Review | Vachana Sanchaya Daily Vachana Widget

WordPress plugin Vachana Sanchaya Daily Vachana Widget scored84%from 54 tests.

About plugin

  • Plugin page: vachana-sanchaya-...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.7.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2014
  • Latest release: May 22, 2020
  • Number of updates: 19
  • Update frequency: every 118.6 days
  • Top authors: omshivaprakash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /873 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.94ms] Passed 4 tests

An overview of server-side resources used by Vachana Sanchaya Daily Vachana Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.65 ▼6.65
Dashboard /wp-admin3.33 ▼0.0245.04 ▼21.22
Posts /wp-admin/edit.php3.38 ▲0.0250.60 ▲3.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.97 ▼17.03
Media Library /wp-admin/upload.php3.25 ▲0.0236.62 ▲1.15

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Vachana Sanchaya Daily Vachana Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.59 ▼0.781.65 ▼0.4941.99 ▼2.25
Dashboard /wp-admin2,206 ▲185.86 ▲0.97111.18 ▼5.2744.89 ▼1.97
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0840.52 ▲2.7036.20 ▼2.24
Add New Post /wp-admin/post-new.php1,514 ▼517.84 ▼5.49668.42 ▼0.5053.28 ▼13.72
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0498.61 ▼6.4443.86 ▼0.99

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_vachana-sanchaya-vachana
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/vachana-sanchaya-daily-vachana/vachana.php:79

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Vachana Sanchaya Daily Vachana widget showing a daily vachana), #2 (Vachana Sanchaya Daily Vachana in Appearance > Widgets), #3 (Vachana Sanchaya Daily Vachana Widget when added to sidebar. Change it's title if you like.)
The official readme.txt is a good inspiration

vachana-sanchaya-daily-vachana/vachana.php 92% from 13 tests

The primary PHP file in "Vachana Sanchaya Daily Vachana Widget" version 2.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("vachana-sanchaya-daily-vachana.php" instead of "vachana.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected88 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1393088

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
4 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png89.17KB19.02KB▼ 78.67%
screenshot-3.png10.37KB4.20KB▼ 59.53%
screenshot-2.png13.65KB5.28KB▼ 61.33%
screenshot-4.png10.30KB4.00KB▼ 61.13%