68% wp-obituary

Code Review | WP Obituary Manager

WordPress plugin WP Obituary Manager scored68%from 54 tests.

About plugin

  • Plugin page: wp-obituary
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 20
  • Update frequency: every 122.7 days
  • Top authors: wptaskforce (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,362 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.90MB] [CPU: ▼49.03ms] Passed 4 tests

A check of server-side resources used by WP Obituary Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.33 ▼32.92
Dashboard /wp-admin2.11 ▼1.208.02 ▼41.24
Posts /wp-admin/edit.php2.11 ▼1.257.58 ▼37.52
Add New Post /wp-admin/post-new.php2.11 ▼3.786.48 ▼84.42
Media Library /wp-admin/upload.php2.11 ▼1.128.70 ▼24.40
Add New /wp-admin/post-new.php?post_type=wp_obituary2.118.58
All Obituaries /wp-admin/edit.php?post_type=wp_obituary2.116.55
Settings /wp-admin/edit.php?post_type=wp_obituary&page=wp-obituary-settings2.117.95
Category /wp-admin/edit-tags.php?taxonomy=obituary_cat&post_type=wp_obituary2.117.51

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Obituary Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9713.76 ▼0.751.60 ▼0.1943.47 ▲0.55
Dashboard /wp-admin2,245 ▲775.81 ▲0.2696.62 ▲7.5076.04 ▲34.92
Posts /wp-admin/edit.php2,171 ▲712.92 ▲0.8940.08 ▲1.6129.00 ▼11.01
Add New Post /wp-admin/post-new.php1,736 ▲21023.19 ▲0.00715.86 ▲29.9945.77 ▼6.92
Media Library /wp-admin/upload.php1,456 ▲595.33 ▲1.11103.68 ▲2.1082.55 ▲36.59
Add New /wp-admin/post-new.php?post_type=wp_obituary2,9758.26207.34149.66
All Obituaries /wp-admin/edit.php?post_type=wp_obituary1,1852.6542.3327.71
Settings /wp-admin/edit.php?post_type=wp_obituary&page=wp-obituary-settings1,0803.6346.7956.10
Category /wp-admin/edit-tags.php?taxonomy=obituary_cat&post_type=wp_obituary1,3682.5935.5432.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-obituary/includes/functions.php+605
    Undefined index: post_type
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=obituary_cat&post_type=wp_obituary
    • > Notice in wp-content/plugins/wp-obituary/includes/functions.php+605
    Trying to get property 'query_vars' of non-object
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=obituary_cat&post_type=wp_obituary
    • > Notice in wp-content/plugins/wp-obituary/includes/functions.php+605
    Trying to access array offset on value of type null
  • 4871 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=obituary_cat&post_type=wp_obituary
    • > Notice in wp-content/plugins/wp-obituary/includes/functions.php+605
    Undefined index: post_type
    • > GET request to /wp-admin/edit.php?post_type=wp_obituary&page=wp-obituary-settings
    • > Notice in wp-content/plugins/wp-obituary/admin/classes/class-settings.php+135
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/wp-obituary/templates/loop-single.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-obituary/templates/single.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_commenter() in wp-content/plugins/wp-obituary/templates/comments.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_queried_object() in wp-content/plugins/wp-obituary/templates/archive.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/wp-obituary/templates/loop-archive.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-obituary/wp-obituary.php Passed 13 tests

The principal PHP file in "WP Obituary Manager" v. 2.0.4 is loaded by WordPress automatically on each request
74 characters long description:
WP Obituary Manager plugin will helps you manage your obituary sites easy.

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
Good job! No executable or dangerous file extensions detected5,293 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript95011793,225
CSS8187671,107
PHP14529112961

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions2392.00%
▷ Anonymous functions28.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/map.png0.57KB0.39KB▼ 32.42%
images/clock.png0.61KB0.33KB▼ 45.34%
admin/assets/images/obituary.png0.64KB0.73KB0.00%
images/calendar.png0.64KB0.60KB▼ 6.70%