84% wp-monsters

Code Review | WP Monsters

WordPress plugin WP Monsters scored 84% from 54 tests.

About plugin

  • Plugin page: wp-monsters
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.2.1
  • WordPress version: 6.3.1
  • First release: Nov 27, 2014
  • Latest release: May 6, 2015
  • Number of updates: 50
  • Update frequency: every 3.2 days
  • Top authors: gwannon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,527 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.04MB] [CPU: ▼14.16ms] Passed 4 tests

This is a short check of server-side resources used by WP Monsters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3237.65 ▼3.75
Dashboard /wp-admin3.58 ▲0.2848.91 ▲1.30
Posts /wp-admin/edit.php3.67 ▲0.3149.10 ▲1.00
Add New Post /wp-admin/post-new.php4.86 ▼1.0244.43 ▼55.19
Media Library /wp-admin/upload.php3.50 ▲0.2741.56 ▲5.85
Type of traps /wp-admin/edit-tags.php?taxonomy=traps&post_type=trap3.4937.90
Weapons /wp-admin/edit.php?post_type=weapon3.5844.91
Type of magic items /wp-admin/edit-tags.php?taxonomy=magic_items&post_type=magic_item3.4937.69
Type of monsters /wp-admin/edit-tags.php?taxonomy=monsters&post_type=monster3.4940.12
Feats /wp-admin/edit.php?post_type=feat3.5839.07
Spells /wp-admin/edit.php?post_type=spell3.5840.21
Type of spells /wp-admin/edit-tags.php?taxonomy=spells&post_type=spell3.4943.32
Type of feats /wp-admin/edit-tags.php?taxonomy=feats&post_type=feat3.4938.97
Type of weapons /wp-admin/edit-tags.php?taxonomy=weapons&post_type=weapon3.4938.58
Traps /wp-admin/edit.php?post_type=trap3.5840.73

Server storage [IO: ▲0.27MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Monsters
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18513.24 ▼1.441.80 ▲0.0240.80 ▼4.38
Dashboard /wp-admin2,290 ▲1015.82 ▼0.03116.63 ▼3.6580.58 ▲32.93
Posts /wp-admin/edit.php2,194 ▲1022.01 ▼0.0535.63 ▼5.9529.96 ▼6.52
Add New Post /wp-admin/post-new.php1,605 ▲7222.99 ▼0.53755.73 ▲78.9158.94 ▼0.70
Media Library /wp-admin/upload.php1,478 ▲904.20 ▲0.00104.45 ▲7.8771.92 ▲25.45
Type of traps /wp-admin/edit-tags.php?taxonomy=traps&post_type=trap1,3602.1429.9433.73
Weapons /wp-admin/edit.php?post_type=weapon1,1741.9333.1529.52
Type of magic items /wp-admin/edit-tags.php?taxonomy=magic_items&post_type=magic_item1,3572.1427.9230.98
Type of monsters /wp-admin/edit-tags.php?taxonomy=monsters&post_type=monster1,3632.1427.1431.63
Feats /wp-admin/edit.php?post_type=feat1,1711.9431.4135.58
Spells /wp-admin/edit.php?post_type=spell1,1712.0634.4531.24
Type of spells /wp-admin/edit-tags.php?taxonomy=spells&post_type=spell1,3572.1427.1430.78
Type of feats /wp-admin/edit-tags.php?taxonomy=feats&post_type=feat1,3572.1428.6232.26
Type of weapons /wp-admin/edit-tags.php?taxonomy=weapons&post_type=weapon1,3602.1427.6430.29
Traps /wp-admin/edit.php?post_type=trap1,1821.9334.0332.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-monsters/wp-weapons.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-monsters/templates.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-monsters/wp-magic-items.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-monsters/wp-monsters.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-monsters/wp-feats.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-monsters/wp-traps.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-monsters/wp-cities.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-monsters/wp-spells.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"WP Monsters" version 1.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
124 characters long description:
This plugin allows to the bloggers to publish in a easy way their Pathfinder RPG home-brew monster in their Wordpress blogs.

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
Everything looks great! No dangerous files found in this plugin4,305 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP82481642,238
PO File31,0041,1172,067

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions137
▷ Named functions137100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/spell.png3.44KB0.98KB▼ 71.46%
img/weapon.png3.06KB0.36KB▼ 88.24%
img/magic_item.png3.11KB0.41KB▼ 86.77%
img/feat.png3.28KB0.66KB▼ 79.80%
img/trap.png3.43KB0.86KB▼ 74.89%