84% woteu-press

Code Review | WOTEU Press

WordPress plugin WOTEU Press scored84%from 54 tests.

About plugin

  • Plugin page: woteu-press
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 2, 2016
  • Latest release: Jul 2, 2016
  • Number of updates: 13
  • Update frequency: N/A
  • Top authors: lafhq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,089 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.44ms] Passed 4 tests

This is a short check of server-side resources used by WOTEU Press
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.79 ▼11.33
Dashboard /wp-admin3.32 ▲0.0246.94 ▲4.82
Posts /wp-admin/edit.php3.37 ▲0.0252.05 ▲1.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.32 ▼10.54
Media Library /wp-admin/upload.php3.25 ▲0.0233.83 ▼1.86
WOTEU Press /wp-admin/options-general.php?page=woteu-press3.2131.84

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_wot_press
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WOTEU Press
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.30 ▼0.952.05 ▼0.3742.77 ▲5.71
Dashboard /wp-admin2,210 ▲224.85 ▼1.05106.92 ▼10.5044.77 ▼1.02
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0039.89 ▼1.0534.94 ▼1.06
Add New Post /wp-admin/post-new.php1,537 ▲323.27 ▼0.11632.21 ▼47.0660.07 ▲1.25
Media Library /wp-admin/upload.php1,386 ▼24.25 ▲0.0297.94 ▼5.4641.08 ▼3.08
WOTEU Press /wp-admin/options-general.php?page=woteu-press7852.0624.0427.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_wot_press
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woteu-press/inc/woteu-press-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woteu-press/inc/woteu-press-func.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/woteu-press/inc/woteu-press-shortcode.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woteu-press/inc/woteu-press-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woteu-press/inc/woteu-press-func.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: "keep.your.money"
  • Screenshots: A description for screenshot #0 is required in woteu-press/assets to your readme.txt
The official readme.txt is a good inspiration

woteu-press/woteu-press.php Passed 13 tests

The entry point to "WOTEU Press" version 0.2 is a PHP file that has certain tags in its header comment area
110 characters long description:
Displays account data from Wargaming.net. Now is statistic from your profile in World of Tanks game available.

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
No dangerous file extensions were detected595 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP56350307
PO File4113114288

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot1.png79.37KB24.04KB▼ 69.71%