78% in-memoriam-light-a-candle

Code Review | In Memoriam (Light a Candle)

WordPress plugin In Memoriam (Light a Candle) scored78%from 54 tests.

About plugin

  • Plugin page: in-memoriam-light...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: May 28, 2015
  • Latest release: Mar 16, 2017
  • Number of updates: 11
  • Update frequency: every 59.9 days
  • Top authors: nsfetcu (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /4,547 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.45MB] [CPU: ▼11.75ms] Passed 4 tests

Server-side resources used by In Memoriam (Light a Candle)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2347.20 ▲8.80
Dashboard /wp-admin3.54 ▲0.2353.77 ▲4.61
Posts /wp-admin/edit.php3.64 ▲0.2856.05 ▲7.06
Add New Post /wp-admin/post-new.php3.39 ▼2.5039.81 ▼67.47
Media Library /wp-admin/upload.php3.47 ▲0.2343.75 ▲9.18
Categories /wp-admin/edit-tags.php?taxonomy=candle_category&post_type=candle3.4640.57
Add New /wp-admin/post-new.php?post_type=candle3.3939.25
Candles /wp-admin/edit.php?post_type=candle3.4953.80
In Memoriam /wp-admin/options-general.php?page=imlac_options_slug3.4333.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for In Memoriam (Light a Candle)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.07 ▼0.305.29 ▲3.6838.86 ▼2.51
Dashboard /wp-admin2,243 ▲525.88 ▼0.0098.25 ▼11.2240.87 ▼1.10
Posts /wp-admin/edit.php2,123 ▲342.02 ▼0.0439.35 ▲2.1835.36 ▼0.26
Add New Post /wp-admin/post-new.php1,562 ▲4823.39 ▲5.71656.74 ▲28.6755.26 ▲5.49
Media Library /wp-admin/upload.php1,422 ▲314.19 ▼0.01103.31 ▲6.2646.92 ▲5.19
Categories /wp-admin/edit-tags.php?taxonomy=candle_category&post_type=candle1,2762.1527.1129.65
Add New /wp-admin/post-new.php?post_type=candle2,4957.93177.4568.36
Candles /wp-admin/edit.php?post_type=candle1,1561.9432.1133.25
In Memoriam /wp-admin/options-general.php?page=imlac_options_slug8191.6722.9124.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • widget_recent-posts
    • ct_activated
    • imlac_candle_publish_notification
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_candles_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=candle
    • > Notice in wp-content/plugins/in-memoriam-light-a-candle/class.in-memoriam-light-a-candle.php+338
    Trying to get property 'post_type' of non-object

SRP 50% 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
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/in-memoriam-light-a-candle/class.candles-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/in-memoriam-light-a-candle/lib/templates/email-prayer-candle.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/in-memoriam-light-a-candle/lib/options.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/in-memoriam-light-a-candle/lib/templates/email-new-candle.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/in-memoriam-light-a-candle/lib/functions.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/in-memoriam-light-a-candle/lib/templates/email-recipient-candle.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/in-memoriam-light-a-candle/lib/shortcodes.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #5 (icon.svg - Icon SVG), #6 (screenshot-1.jpg - Example use of the [candles] shortcode. This will display all candles with pagination.), #7 (screenshot-2.jpg - Example use of the [candle-submission-form] shortcode. This shortcode will turn this page into a Candle submission page for your users.), #8 (screenshot-3.jpg - Example use of the Candle widget.), #9 (screenshot-4.jpg - Managing Candles section in control panel)
You can look at the official readme.txt

in-memoriam-light-a-candle/in-memoriam-light-a-candle.php Passed 13 tests

The main PHP file in "In Memoriam (Light a Candle)" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
70 characters long description:
Allows you to easily and quickly add candles to your WordPress website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,528 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP115012061,114
PO File3149180376
JavaScript325538

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes375.00%
Methods22
▷ Static methods1463.64%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin