72% eonet-live-search

Code Review | Eonet Live Search

WordPress plugin Eonet Live Search scored72%from 54 tests.

About plugin

  • Plugin page: eonet-live-search
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Oct 21, 2016
  • Latest release: Oct 5, 2018
  • Number of updates: 41
  • Update frequency: every 17.4 days
  • Top authors: alkaweb (95.12%)antonioeatgoat (7.32%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /11,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.15ms] Passed 4 tests

An overview of server-side resources used by Eonet Live Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.98 ▼1.49
Dashboard /wp-admin3.45 ▲0.1444.96 ▼1.70
Posts /wp-admin/edit.php3.50 ▲0.1448.71 ▼1.77
Add New Post /wp-admin/post-new.php5.98 ▲0.1092.13 ▼7.63
Media Library /wp-admin/upload.php3.37 ▲0.1442.25 ▲8.80
Eonet /wp-admin/admin.php?page=eonet3.3839.76
Live Search /wp-admin/admin.php?page=?page=eonet&eo_settings=live-search3.1421.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 77 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Eonet Live Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲23114.18 ▼0.208.26 ▲5.9538.70 ▼6.67
Dashboard /wp-admin2,235 ▲445.32 ▲0.43108.34 ▲0.53105.41 ▲62.19
Posts /wp-admin/edit.php2,133 ▲442.06 ▲0.0743.34 ▼0.2248.36 ▲12.88
Add New Post /wp-admin/post-new.php1,708 ▲19423.25 ▲5.75675.61 ▲28.6232.82 ▼30.19
Media Library /wp-admin/upload.php1,426 ▲474.75 ▲0.56107.23 ▲8.8876.39 ▲25.96
Eonet /wp-admin/admin.php?page=eonet1,1452.1831.5272.51
Live Search /wp-admin/admin.php?page=?page=eonet&eo_settings=live-search280.440.103.12

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/eonet-live-search/init.php
    • > /wp-content/plugins/eonet-live-search/core/EonetMetaboxes.php
    • > /wp-content/plugins/eonet-live-search/core/admin/EonetAdmin.php
    • > /wp-content/plugins/eonet-live-search/core/helpers.php
    • > /wp-content/plugins/eonet-live-search/core/admin/pages/EonetPageThemes.php
    • > /wp-content/plugins/eonet-live-search/core/admin/EonetAdminPages.php
    • > /wp-content/plugins/eonet-live-search/core/bootstrap.php
    • > /wp-content/plugins/eonet-live-search/core/EonetComponents.php
    • > /wp-content/plugins/eonet-live-search/core/EonetGoogleFontLoader.php
    • > /wp-content/plugins/eonet-live-search/core/admin/pages/EonetPageSettings.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\EonetComponents' not found in wp-content/plugins/eonet-live-search/core/admin/pages/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\Admin\\EonetAdmin' not found in wp-content/plugins/eonet-live-search/core/admin/pages/views/themes.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ComponentLiveSearch\\EonetLiveSearch' not found in wp-content/plugins/eonet-live-search/component-live-search/views/results.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\EonetOptions' not found in wp-content/plugins/eonet-live-search/component-live-search/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/eonet-live-search/core/admin/pages/views/support.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\EonetComponents' not found in wp-content/plugins/eonet-live-search/core/admin/views/wrapper.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Eonet\\Core\\EonetComponents' not found in wp-content/plugins/eonet-live-search/core/admin/pages/views/extensions.php:3

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 fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=eonet
    • > Network (severe)
    wp-content/plugins/eonet-live-search/core/assets/js/bootstrap.min.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=?page=eonet&eo_settings=live-search
    • > Network (severe)
    wp-admin/admin.php?page=?page=eonet&eo_settings=live-search - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
8 plugin tags: ajax, buddypress, members, posts, products...

eonet-live-search/init.php 85% from 13 tests

The main PHP file in "Eonet Live Search" ver. 1.1.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("eonet-live-search.php" instead of "init.php")
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected19,227 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP2572794011,579
SVG2034,898
Sass154282,061
JavaScript5228204685
CSS43824

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity21.31
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods102
▷ Static methods4342.16%
▷ Public methods7876.47%
▷ Protected methods2120.59%
▷ Private methods32.94%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
12 compressed PNG files occupy 0.53MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/colorpicker/hue.png0.49KB0.50KB0.00%
core/assets/images/colorpicker/hue-horizontal.png0.47KB0.47KB0.00%
core/assets/images/colorpicker/alpha-horizontal.png0.54KB1.62KB0.00%
core/assets/images/connections_left.png32.13KB15.77KB▼ 50.90%
core/assets/images/colorpicker/saturation.png4.05KB5.13KB0.00%