83% nm-gift-registry-and-wishlist-lite

Code Review | NM Gift Registry and Wishlist Lite

WordPress plugin NM Gift Registry and Wishlist Lite scored83%from 54 tests.

About plugin

  • Plugin page: nm-gift-registry-...
  • Plugin version: 4.10
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2020
  • Latest release: Nov 22, 2023
  • Number of updates: 104
  • Update frequency: every 12.8 days
  • Top authors: nmerii (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

300+ active /16,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
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.62ms] Passed 4 tests

Analyzing server-side resources used by NM Gift Registry and Wishlist Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1344.70 ▲2.80
Dashboard /wp-admin3.43 ▲0.1345.75 ▼5.50
Posts /wp-admin/edit.php3.55 ▲0.1946.70 ▼1.44
Add New Post /wp-admin/post-new.php6.01 ▲0.1394.82 ▲7.89
Media Library /wp-admin/upload.php3.36 ▲0.1335.45 ▲1.66

Server storage [IO: ▲1.04MB] [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: 105 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
nmgr_flush_rewrite_rules
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for NM Gift Registry and Wishlist Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.23 ▲0.031.69 ▼0.1236.50 ▼8.45
Dashboard /wp-admin2,192 ▲205.61 ▼0.1694.03 ▼20.6143.29 ▼4.30
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0139.34 ▼5.8035.64 ▼2.74
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▲0.13648.06 ▼38.6158.06 ▲7.19
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.0397.84 ▼1.5942.01 ▼6.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • nmgr_flush_rewrite_rules
    • theysaidso_admin_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
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'NMGR\\Dialog\\Modal' not found in wp-content/plugins/nm-gift-registry-and-wishlist-lite/includes/Dialog/Toast.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'NMGR\\Tables\\Table' not found in wp-content/plugins/nm-gift-registry-and-wishlist-lite/includes/Tables/ItemsTable.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'NMGR\\Tables\\Table' not found in wp-content/plugins/nm-gift-registry-and-wishlist-lite/includes/Tables/ItemsTotalsTable.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'NMGR\\Tables\\Table' not found in wp-content/plugins/nm-gift-registry-and-wishlist-lite/includes/Tables/WishlistsTable.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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 require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

nm-gift-registry-and-wishlist-lite/nm-gift-registry-lite.php 77% from 13 tests

The entry point to "NM Gift Registry and Wishlist Lite" version 4.10 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nm-gift-registry-and-wishlist-lite.php" instead of "nm-gift-registry-lite.php")
  • Description: The description should be shorter than 140 characters (currently 304 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin18,339 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP623,4164,41518,014
CSS3370157
SVG3300142
JavaScript451426

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity50.91
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes54
▷ Abstract classes35.56%
▷ Concrete classes5194.44%
▷ Final classes00.00%
Methods948
▷ Static methods23424.68%
▷ Public methods78182.38%
▷ Protected methods10410.97%
▷ Private methods636.65%
Functions185
▷ Named functions16790.27%
▷ Anonymous functions189.73%
Constants1
▷ Global constants1100.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
No PNG files were detected