10% draupnir-ringmanager

Code Review | Draupnir Ringmanager

WordPress plugin Draupnir Ringmanager scored10%from 54 tests.

About plugin

  • Plugin page: draupnir-ringmanager
  • Plugin version: 1.7.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.0
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Sep 12, 2014
  • Number of updates: 47
  • Update frequency: every 4.7 days
  • Top authors: jarandhel (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,647 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/draupnir-ringmanager/draupnir.php+424
    Undefined variable: options

Server metrics [RAM: ▼1.31MB] [CPU: ▼38.16ms] Passed 4 tests

This is a short check of server-side resources used by Draupnir Ringmanager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.69 ▼0.7726.20 ▼14.75
Dashboard /wp-admin2.71 ▼0.6427.97 ▼33.76
Posts /wp-admin/edit.php2.71 ▼0.6529.34 ▼24.71
Add New Post /wp-admin/post-new.php2.71 ▼3.1828.09 ▼79.42
Media Library /wp-admin/upload.php2.71 ▼0.5229.38 ▼7.58

Server storage [IO: ▲0.09MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: 2 new tables, 7 new options
New tables
wp_draupnir_stats
wp_draupnir
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
plugin_draupnir_settings
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Draupnir Ringmanager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.36 ▼1.021.71 ▲0.0242.52 ▲2.00
Dashboard /wp-admin2,239 ▲544.98 ▼0.8796.02 ▼5.4881.23 ▲38.87
Posts /wp-admin/edit.php2,138 ▲492.38 ▲0.3537.79 ▼1.9536.29 ▲1.85
Add New Post /wp-admin/post-new.php1,543 ▲122.07 ▲3.66775.49 ▲156.2030.88 ▼30.13
Media Library /wp-admin/upload.php1,428 ▲374.49 ▲0.31109.86 ▲12.7247.22 ▲5.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/draupnir-ringmanager/draupnir.php+424
    Undefined variable: options
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_draupnir
    • wp_draupnir_stats
  • The uninstall procedure has failed, leaving 7 options in the database
    • plugin_draupnir_settings
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/draupnir-ringmanager/draupnir.php:34

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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: You can look at the official readme.txt

draupnir-ringmanager/draupnir.php 92% from 13 tests

The main file in "Draupnir Ringmanager" v. 1.7.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("draupnir-ringmanager.php" instead of "draupnir.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,406 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1119821,406

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity182.00
▷ Minimum class complexity182.00
▷ Maximum class complexity182.00
Average method complexity7.24
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.64KB0.57KB▼ 10.94%