68% flip-and-win

Code Review | Filp & Win

WordPress plugin Filp & Win scored 68% from 54 tests.

About plugin

  • Plugin page: flip-and-win
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jun 2, 2022
  • Latest release: Jun 2, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: fadlinco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 220 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼43.64ms] Passed 4 tests

This is a short check of server-side resources used by Filp & Win
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.14 ▼0.3216.97 ▼26.68
Dashboard /wp-admin3.18 ▼0.1218.11 ▼33.35
Posts /wp-admin/edit.php3.18 ▼0.1818.23 ▼31.27
Add New Post /wp-admin/post-new.php3.18 ▼2.7117.97 ▼83.26
Media Library /wp-admin/upload.php3.18 ▼0.0518.17 ▼16.69
All Cards /wp-admin/edit.php?post_type=couponcode3.1817.19
Settings /wp-admin/edit.php?post_type=couponcode&page=flip_and_win_setting3.1817.32

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
coupon_code_option
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Filp & Win
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,060 ▲32515.44 ▲1.044.92 ▲2.9639.94 ▼6.88
Dashboard /wp-admin2,380 ▲1956.49 ▲1.54117.02 ▼4.1041.31 ▼4.67
Posts /wp-admin/edit.php2,286 ▲2003.42 ▲1.4154.22 ▲20.6537.53 ▲3.13
Add New Post /wp-admin/post-new.php1,556 ▲2817.98 ▼4.87595.88 ▼62.6134.18 ▼30.11
Media Library /wp-admin/upload.php1,425 ▲374.22 ▲0.0181.88 ▼38.2044.39 ▼3.43
All Cards /wp-admin/edit.php?post_type=couponcode1,2623.4342.4127.80
Settings /wp-admin/edit.php?post_type=couponcode&page=flip_and_win_setting2,2373.2337.8428.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/flip-and-win/flip-and-win.php+779
    Undefined index: faw_lv
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • coupon_code_option
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=couponcode&page=flip_and_win_setting
    • > Notice in wp-content/plugins/flip-and-win/flip-and-win.php+1428
    Undefined index: faw_lv
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=couponcode&page=flip_and_win_setting
    • > Notice in wp-content/plugins/flip-and-win/flip-and-win.php+1445
    Undefined index: tab
    • > GET request to /wp-admin/edit.php?post_type=couponcode&page=flip_and_win_setting
    • > Notice in wp-content/plugins/flip-and-win/flip-and-win.php+1413
    Undefined index: d_name

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/flip-and-win/flip-and-win.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: game, flip win, woocommerce

flip-and-win/flip-and-win.php Passed 13 tests

The main file in "Filp & Win" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
12 characters long description:
Flip and Win

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,380 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3311501,939
PHP2400521,896
CSS435106545

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 322)
Cyclomatic complexity
Average complexity per logical line of code0.83
Average class complexity282.00
▷ Minimum class complexity19.00
▷ Maximum class complexity545.00
Average method complexity30.58
▷ Minimum method complexity1.00
▷ Maximum method complexity322.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/emoji.png81.34KB24.08KB▼ 70.39%