78% wowpi

Code Review | WoWpi

WordPress plugin WoWpi scored78%from 54 tests.

About plugin

  • Plugin page: wowpi
  • Plugin version: 2.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Feb 3, 2019
  • Number of updates: 154
  • Update frequency: every 6.2 days
  • Top authors: avenirer (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

30+ active /8,089 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.59MB] [CPU: ▼1.32ms] Passed 4 tests

This is a short check of server-side resources used by WoWpi
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5528.64 ▼9.44
Dashboard /wp-admin3.95 ▲0.6445.35 ▼3.29
Posts /wp-admin/edit.php4.00 ▲0.6448.71 ▲4.33
Add New Post /wp-admin/post-new.php6.47 ▲0.5893.29 ▲4.16
Media Library /wp-admin/upload.php3.81 ▲0.5837.56 ▲3.31
WoWpi Settings /wp-admin/options-general.php?page=wowpi3.7531.53

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 178 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_wowpi_widget_character
widget_recent-comments
widget_theysaidso_widget
wowpi_version
can_compress_scripts
widget_wowpi_widget_realms

Browser metrics Passed 4 tests

WoWpi: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.61 ▼0.9911.25 ▲9.7238.37 ▼4.11
Dashboard /wp-admin2,196 ▲165.49 ▼0.1085.80 ▼3.5337.35 ▼2.72
Posts /wp-admin/edit.php2,101 ▲12.02 ▼0.0035.80 ▲1.3433.61 ▼1.91
Add New Post /wp-admin/post-new.php1,529 ▲323.35 ▲0.35607.64 ▼96.2170.17 ▲13.49
Media Library /wp-admin/upload.php1,401 ▲14.19 ▼0.0295.96 ▼4.1542.23 ▼2.60
WoWpi Settings /wp-admin/options-general.php?page=wowpi1,0271.9921.8929.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_wowpi_widget_character
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_wowpi_widget_realms
    • wowpi_version
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 26 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wowpi
    • > Notice in wp-content/plugins/wowpi/includes/wowpi_admin.php+161
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wowpi/includes/wowpi_widget_character.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/wowpi/wowpi.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wowpi/includes/scripts.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wowpi/includes/wowpi_shortcodes.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wowpi/includes/wowpi_widget_realms.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wowpi/includes/wowpi_admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wowpi/includes/wowpi_widgets.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: armory, wow, world of warcraft

wowpi/wowpi.php Passed 13 tests

"WoWpi" version 2.5.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
84 characters long description:
WoWpi is an World of Warcraft API Armory plugin used to get data from Battle.net API

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
No dangerous file extensions were detected4,514 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP184643053,145
JSON200779
PO File3132138362
CSS32512227
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity16.00
▷ Minimum class complexity14.00
▷ Maximum class complexity18.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions93
▷ Named functions93100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.92MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/theme/skull_normal.png1.90KB1.30KB▼ 31.36%
assets/images/symbols/class-5.png72.43KB21.41KB▼ 70.44%
assets/images/theme/shield.png0.31KB0.29KB▼ 7.28%
assets/images/symbols/class-2.png83.91KB24.66KB▼ 70.61%
assets/images/symbols/class-7.png87.86KB23.91KB▼ 72.78%