84% wp-lucky-wheel

Code Review | WordPress Lucky Wheel - Spin a Sale

WordPress plugin WordPress Lucky Wheel - Spin a Sale scored84%from 54 tests.

About plugin

  • Plugin page: wp-lucky-wheel
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Apr 26, 2018
  • Latest release: Sep 22, 2023
  • Number of updates: 37
  • Update frequency: every 53.8 days
  • Top authors: kimvt1991 (43.24%)mrt3vn (32.43%)dragonlord47 (21.62%)thanhtd (10.81%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active /23,967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.89MB] [CPU: ▲7.47ms] Passed 4 tests

Server-side resources used by WordPress Lucky Wheel - Spin a Sale
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8440.86 ▲2.68
Dashboard /wp-admin4.25 ▲0.9557.03 ▲9.68
Posts /wp-admin/edit.php4.30 ▲0.9557.17 ▲9.84
Add New Post /wp-admin/post-new.php6.77 ▲0.8994.64 ▲7.68
Media Library /wp-admin/upload.php4.11 ▲0.8948.07 ▲11.47
Report /wp-admin/admin.php?page=wplwl-report4.0938.81
Emails /wp-admin/edit.php?post_type=wplwl_email4.1947.90
WP Lucky Wheel /wp-admin/admin.php?page=wp-lucky-wheel4.1343.52
Extensions /wp-admin/admin.php?page=wp-lucky-wheel-extensions4.1040.10
System Status /wp-admin/admin.php?page=wplwl-system-status4.0843.16

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wp-lucky-wheel_start_use
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

WordPress Lucky Wheel - Spin a Sale: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,185 ▲42413.79 ▲0.5326.69 ▲21.6291.82 ▲43.47
Dashboard /wp-admin2,259 ▲825.64 ▲0.0391.45 ▼6.2544.87 ▲1.36
Posts /wp-admin/edit.php2,164 ▲611.99 ▼0.0240.16 ▲3.8336.93 ▲4.06
Add New Post /wp-admin/post-new.php1,575 ▲4423.10 ▲0.06624.80 ▼18.4263.86 ▲10.65
Media Library /wp-admin/upload.php1,464 ▲644.13 ▼0.0598.84 ▼6.9342.45 ▼2.92
Report /wp-admin/admin.php?page=wplwl-report9262.0029.2725.45
Emails /wp-admin/edit.php?post_type=wplwl_email1,1731.9336.1531.31
WP Lucky Wheel /wp-admin/admin.php?page=wp-lucky-wheel5,70710.84427.50143.62
Extensions /wp-admin/admin.php?page=wp-lucky-wheel-extensions1,7782.0527.9655.29
System Status /wp-admin/admin.php?page=wplwl-system-status8741.9928.4634.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • wp-lucky-wheel_start_use
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-lucky-wheel
    • > Notice in wp-content/plugins/wp-lucky-wheel/includes/data.php+166
    Undefined index: wheel_speed

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: spin 2 win, wheelio for wordpress, optin popup, mailchimp, wordpress fortune wheel...

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

The main file in "WordPress Lucky Wheel - Spin a Sale" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
100 characters long description:
Collect customers emails by letting them play interesting Lucky wheel game to get interesting awards

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
No dangerous file extensions were detected16,115 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,4874218,716
PHP82757454,948
CSS182261781,313
SVG203651
PO File1216275487

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity86.29
▷ Minimum class complexity17.00
▷ Maximum class complexity174.00
Average method complexity6.49
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods94
▷ Static methods1111.70%
▷ Public methods8893.62%
▷ Protected methods44.26%
▷ Private methods22.13%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants17
▷ Global constants847.06%
▷ Class constants952.94%
▷ 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fs-sprite.png0.22KB0.18KB▼ 15.63%
images/2020.png17.05KB8.88KB▼ 47.93%