83% rs-diwali-lantern

Code Review | RS Diwali Lantern

WordPress plugin RS Diwali Lantern scored83%from 54 tests.

About plugin

  • Plugin page: rs-diwali-lantern
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 26, 2016
  • Latest release: Sep 26, 2022
  • Number of updates: 35
  • Update frequency: every 60.8 days
  • Top authors: rashmibright (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,582 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.95ms] Passed 4 tests

An overview of server-side resources used by RS Diwali Lantern
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.35 ▼3.32
Dashboard /wp-admin3.37 ▲0.0753.21 ▲2.44
Posts /wp-admin/edit.php3.49 ▲0.1353.15 ▲6.08
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.22 ▼8.64
Media Library /wp-admin/upload.php3.27 ▲0.0537.25 ▲1.72

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
rsdl_settings

Browser metrics Passed 4 tests

A check of browser resources used by RS Diwali Lantern
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲21314.53 ▼0.151.94 ▲0.0644.61 ▼3.18
Dashboard /wp-admin2,350 ▲1706.17 ▲0.48107.09 ▲6.1036.11 ▼10.92
Posts /wp-admin/edit.php2,278 ▲1813.36 ▲1.3548.20 ▲10.2233.75 ▼0.59
Add New Post /wp-admin/post-new.php1,541 ▼817.93 ▼5.59662.46 ▼40.5236.80 ▼21.34
Media Library /wp-admin/upload.php1,415 ▲124.20 ▼0.0387.90 ▼11.8445.47 ▼1.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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: Call to undefined function register_activation_hook() in wp-content/plugins/rs-diwali-lantern/rs-diwali-lantern.php:15

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 86% from 29 tests

readme.txt 81% 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
Please fix the following attributes:
  • Donate link: Invalid URI ("")
  • Screenshots: A description for screenshot #4 is missing in rs-diwali-lantern/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

rs-diwali-lantern/rs-diwali-lantern.php 92% from 13 tests

The entry point to "RS Diwali Lantern" version 2.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 264 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin365 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP17818287
JavaScript117340
CSS19238

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/no-image.png3.44KB1.62KB▼ 52.91%