77% lucky-orange

Code Review | Lucky Orange

WordPress plugin Lucky Orange scored77%from 54 tests.

About plugin

  • Plugin page: lucky-orange
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.3-6.3.0
  • WordPress version: 6.3.1
  • First release: Nov 29, 2010
  • Latest release: Sep 20, 2023
  • Number of updates: 71
  • Update frequency: every 65.9 days
  • Top authors: crickeys (91.55%)madintist (9.86%)

Code review

54 tests

User reviews

15 reviews

Install metrics

4,000+ active /60,053 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.47ms] Passed 4 tests

A check of server-side resources used by Lucky Orange
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0345.21 ▲2.33
Dashboard /wp-admin3.35 ▲0.0446.05 ▼4.58
Posts /wp-admin/edit.php3.40 ▲0.0449.18 ▲3.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.97 ▲11.25
Media Library /wp-admin/upload.php3.27 ▲0.0436.76 ▼2.63
Settings /wp-admin/admin.php?page=lucky-orange-settings3.2432.49
Lucky Orange /wp-admin/options-general.php?page=lucky-orange-settings3.2432.02
Dashboard /wp-admin/admin.php?page=lucky-orange3.2237.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
lo_uuid
lo_setup
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Lucky Orange
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲11513.26 ▼1.111.70 ▼0.4241.43 ▼8.56
Dashboard /wp-admin2,289 ▲1015.84 ▲0.0495.85 ▼18.2939.07 ▼3.50
Posts /wp-admin/edit.php2,176 ▲872.01 ▲0.0035.17 ▼2.4035.01 ▲1.61
Add New Post /wp-admin/post-new.php1,541 ▲823.31 ▼0.05585.94 ▼119.6753.27 ▼6.12
Media Library /wp-admin/upload.php1,474 ▲894.26 ▲0.0695.70 ▼14.7940.00 ▼6.72
Settings /wp-admin/admin.php?page=lucky-orange-settings8682.0424.2926.75
Lucky Orange /wp-admin/options-general.php?page=lucky-orange-settings8682.0424.2828.26
Dashboard /wp-admin/admin.php?page=lucky-orange1,26521.96711.3384.87

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/lucky-orange/lucky_wordpress.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=lucky-orange
    • > Other (warning) in unknown
    https://app.luckyorange.com/assets/index.17b0fbce.js 948 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
    • > GET request to /wp-admin/admin.php?page=lucky-orange
    • > Console-api (severe) in unknown
    https://app.luckyorange.com/assets/index.17b0fbce.js 8:25142 TypeError: Cannot read properties of undefined (reading 'addEventListener')at o.created (https://app.luckyorange.com/assets/index.17b0fbce.js:917:78635)at Qa (https://app.luckyorange.com/assets/index.17b0fbce.js:9:24836)at Xn (https://app.luckyorange.com/assets/index.17b0fbce.js:9:33741)at Lq.i._init (https://app.luckyorange.com/assets/index.17b0fbce.js:9:44198)at new o (https://app.luckyorange.com/assets/index.17b0fbce.js:9:45457)at fq (https://app.luckyorange.com/assets/index.17b0fbce.js:9:38079)at init (https://app.luckyorange.com/assets/index.17b0fbce.js:9:36920)at d (https://app.luckyorange.com/assets/index.17b0fbce.js:9:54485)at u (https://app.luckyorange.com/assets/index.17b0fbce.js:9:54107)at f (https://app.luckyorange.com/assets/index.17b0fbce.js:9:55091)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: Screenshot #7 (Form Analytics) image not found
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

lucky-orange/lucky_wordpress.php 92% from 13 tests

The main PHP file in "Lucky Orange" ver. 2.1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("lucky-orange.php" instead of "lucky_wordpress.php")

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 detected198 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13120198

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin