72% minecraft-item-library

Code Review | Minecraft Item Library

WordPress plugin Minecraft Item Library scored72%from 54 tests.

About plugin

  • Plugin page: minecraft-item-li...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 22, 2012
  • Latest release: Oct 23, 2012
  • Number of updates: 20
  • Update frequency: every 0.1 days
  • Top authors: alieneila (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,786 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.54MB] [CPU: ▼17.97ms] Passed 4 tests

An overview of server-side resources used by Minecraft Item Library
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0823.79 ▼16.17
Dashboard /wp-admin3.47 ▲0.1744.73 ▼4.84
Posts /wp-admin/edit.php3.53 ▲0.1745.23 ▲1.81
Add New Post /wp-admin/post-new.php3.32 ▼2.5734.79 ▼51.53
Media Library /wp-admin/upload.php3.39 ▲0.1733.31 ▲0.67
MC Categories /wp-admin/edit-tags.php?taxonomy=mctype&post_type=minecraft-item3.4351.28
Add New MC Item /wp-admin/post-new.php?post_type=minecraft-item3.3134.04
Minecraft Item /wp-admin/edit.php?post_type=minecraft-item3.4436.07

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
almc_options
mctype_children
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Minecraft Item Library
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.30 ▼1.001.59 ▼0.5541.18 ▲0.67
Dashboard /wp-admin2,241 ▲595.85 ▼0.01100.12 ▼3.5943.43 ▲1.80
Posts /wp-admin/edit.php2,124 ▲382.03 ▼0.0237.55 ▲0.7135.05 ▼0.29
Add New Post /wp-admin/post-new.php1,571 ▲3318.33 ▼4.81635.31 ▼42.2255.64 ▼8.65
Media Library /wp-admin/upload.php1,420 ▲354.29 ▲0.0596.40 ▼19.4042.17 ▼3.72
MC Categories /wp-admin/edit-tags.php?taxonomy=mctype&post_type=minecraft-item2,4632.1428.9138.79
Add New MC Item /wp-admin/post-new.php?post_type=minecraft-item3,6917.96186.00157.35
Minecraft Item /wp-admin/edit.php?post_type=minecraft-item1,1301.9331.6531.20
MC Settings /wp-admin/mcitemadmin.php260.440.0811.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • mctype_children
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • almc_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=minecraft-item
    • > Notice in wp-content/plugins/minecraft-item-library/lib/mcitemboxes.php+370
    Undefined index: craftable_noncename

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
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/minecraft-item-library/plugin.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minecraft-item-library/admin/mcitemadmin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/minecraft-item-library/lib/mcitemtables.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minecraft-item-library/lib/mcitemboxes.php:359
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minecraft-item-library/lib/mciteminit.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/mcitemadmin.php
    • > Network (severe)
    wp-admin/mcitemadmin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: recipes, minecraft, items

minecraft-item-library/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Minecraft Item Library" version 1.1
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("minecraft-item-library.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,017 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP57139984
CSS114733

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/smelting.png4.42KB2.18KB▼ 50.70%
images/pop8.png1.05KB0.17KB▼ 84.24%
images/heart-g.png1.46KB0.78KB▼ 46.80%
images/pop7.png1.08KB0.18KB▼ 83.51%
images/pop2.png0.20KB0.14KB▼ 26.73%