10% wp-fortune-wheel

Code Review | WP Fortune Wheel

WordPress plugin WP Fortune Wheel scored10%from 54 tests.

About plugin

  • Plugin page: wp-fortune-wheel
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Aug 4, 2019
  • Latest release: Aug 4, 2019
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: startupsconsultancy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /731 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-fortune-wheel/includes/support.php+15
    Undefined index: support

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.64ms] Passed 4 tests

This is a short check of server-side resources used by WP Fortune Wheel
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.08 ▼35.51
Dashboard /wp-admin2.05 ▼1.255.19 ▼45.02
Posts /wp-admin/edit.php2.05 ▼1.306.00 ▼40.02
Add New Post /wp-admin/post-new.php2.05 ▼3.845.19 ▼94.02
Media Library /wp-admin/upload.php2.05 ▼1.185.25 ▼29.52
Subscribers /wp-admin/edit.php?post_type=wfw_email2.054.76
System Status /wp-admin/admin.php?page=wfw-system-status2.056.50
WP Fortune Wheel /wp-admin/admin.php?page=wp-fortune-wheel2.055.02
Report /wp-admin/admin.php?page=wfw-report2.056.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
_wfw_settings
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
wp-fortune-wheel_start_use
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Fortune Wheel
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,503 ▲76816.25 ▲1.5021.78 ▲20.0990.56 ▲49.19
Dashboard /wp-admin2,651 ▲4627.21 ▲2.12148.30 ▲31.3345.03 ▲1.28
Posts /wp-admin/edit.php2,480 ▲3913.74 ▲1.7156.72 ▲18.6629.96 ▼2.68
Add New Post /wp-admin/post-new.php1,592 ▲7224.09 ▲0.99661.00 ▲18.9236.45 ▼22.96
Media Library /wp-admin/upload.php1,738 ▲3535.01 ▲0.8391.22 ▼12.5842.34 ▼2.27
Subscribers /wp-admin/edit.php?post_type=wfw_email1,5393.7256.4927.84
System Status /wp-admin/admin.php?page=wfw-system-status1,2553.3951.8328.01
WP Fortune Wheel /wp-admin/admin.php?page=wp-fortune-wheel4,45710.87386.7894.49
Report /wp-admin/admin.php?page=wfw-report1,3103.5349.4621.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-fortune-wheel/includes/support.php+15
    Undefined index: support
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • wp-fortune-wheel_start_use
    • widget_recent-comments
    • _wfw_settings
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wfw-report
    • > Notice in wp-content/plugins/wp-fortune-wheel/includes/support.php+15
    Undefined index: support
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wfw-report
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'WFW_Support' does not have a method 'admin_menu'
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wfw-report
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'WFW_Support' does not have a method 'form_ads'

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wfw-report
    • > Network (severe)
    wp-content/plugins/wp-fortune-wheel/css/admin-icon-style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

wp-fortune-wheel/wp-fortune-wheel.php Passed 13 tests

"WP Fortune Wheel" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
93 characters long description:
Collect customer emails by let them play interesting Fortune wheel game to win amazing prizes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected13,278 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,4994228,996
PHP42406803,073
CSS181681211,123
SVG10386

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity167.33
▷ Minimum class complexity26.00
▷ Maximum class complexity342.00
Average method complexity8.80
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods64
▷ Static methods1015.62%
▷ Public methods6296.88%
▷ Protected methods23.12%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants743.75%
▷ Class constants956.25%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Schedule_social_media_posts1.png10.70KB4.06KB▼ 62.03%
images/fs-sprite.png0.22KB0.18KB▼ 15.63%
images/Schedule_social_media_posts4.png15.33KB5.56KB▼ 63.76%
images/Schedule_social_media_posts3.png15.29KB5.25KB▼ 65.66%
images/Schedule_social_media_posts2.png10.60KB4.05KB▼ 61.82%