78% wp-lucky-search

Code Review | WP Lucky Search

WordPress plugin WP Lucky Search scored78%from 54 tests.

About plugin

  • Plugin page: wp-lucky-search
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2015
  • Latest release: Jan 11, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: HarishChaudhari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,148 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼15.02ms] Passed 4 tests

Server-side resources used by WP Lucky Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /57.21 ▲0.2611,112,823.88 ▲8,185.17
Dashboard /wp-admin3.42 ▲0.0349.71 ▼21.24
Posts /wp-admin/edit.php3.53 ▲0.1353.23 ▼4.83
Add New Post /wp-admin/post-new.php6.00 ▲0.0790.51 ▼32.90
Media Library /wp-admin/upload.php3.34 ▲0.0736.79 ▼1.11
WP Lucky Search /wp-admin/options-general.php?page=wpls3.3133.55

Server storage [IO: ▲0.04MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Lucky Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.43 ▼1.218.08 ▲6.4339.19 ▼3.46
Dashboard /wp-admin2,202 ▲285.62 ▲0.0285.28 ▼9.4139.19 ▼0.58
Posts /wp-admin/edit.php2,104 ▲252.02 ▼0.0135.37 ▼1.2030.23 ▼5.35
Add New Post /wp-admin/post-new.php1,528 ▲223.77 ▲0.28692.84 ▲32.8570.59 ▲10.15
Media Library /wp-admin/upload.php1,404 ▲74.14 ▼0.0494.18 ▼2.0941.23 ▼5.53
WP Lucky Search /wp-admin/options-general.php?page=wpls9142.0223.4630.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • 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
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpls
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpls
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to get property 'wpls_textdomain' of non-object in wp-content/plugins/wp-lucky-search/lib/admin/class-wpls-admin.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-lucky-search/lib/admin/class-wpls-admin.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-lucky-search/wp-lucky-search.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-lucky-search/lib/class-wpls-main.php:102

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-lucky-search/wp-lucky-search.php 92% from 13 tests

The entry point to "WP Lucky Search" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin285 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP376244225
Markdown130037
JavaScript14723

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.67
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected