84% memorialday

Code Review | MemorialDay

WordPress plugin MemorialDay scored84%from 54 tests.

About plugin

  • Plugin page: memorialday
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Jul 28, 2023
  • Number of updates: 9
  • Update frequency: every 134.4 days
  • Top authors: shenyanzhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,105 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.97ms] Passed 4 tests

This is a short check of server-side resources used by MemorialDay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.85 ▼9.90
Dashboard /wp-admin3.32 ▲0.0243.78 ▼6.68
Posts /wp-admin/edit.php3.37 ▲0.0246.13 ▼3.52
Add New Post /wp-admin/post-new.php5.90 ▲0.02105.54 ▲11.91
Media Library /wp-admin/upload.php3.25 ▲0.0237.63 ▲4.23
MemorialDay设置 /wp-admin/options-general.php?page=memorialday/memorial-day.php3.2133.02

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
memorial_day_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for MemorialDay
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.394.35 ▲1.9540.29 ▼7.79
Dashboard /wp-admin2,207 ▲225.80 ▲0.9399.44 ▼15.5839.80 ▼8.62
Posts /wp-admin/edit.php2,093 ▲222.02 ▲0.0135.99 ▼1.6538.65 ▲2.97
Add New Post /wp-admin/post-new.php1,522 ▲523.33 ▲5.71700.16 ▲46.7054.87 ▲2.59
Media Library /wp-admin/upload.php1,392 ▲44.14 ▼0.06109.92 ▲11.7652.17 ▲9.03
MemorialDay设置 /wp-admin/options-general.php?page=memorialday/memorial-day.php8182.0628.2077.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • memorial_day_options

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

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/memorialday/memorial-day.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image missing
Please take inspiration from this readme.txt

memorialday/memorial-day.php 92% from 13 tests

The main PHP script in "MemorialDay" version 1.0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("memorialday.php" instead of "memorial-day.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected114 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP215986
Markdown122028

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.32MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png267.14KB101.42KB▼ 62.03%
wordpress-MemorialDay.png57.77KB59.33KB0.00%