84% dragonfly

Code Review | Dragonfly - Advanced Live Search

WordPress plugin Dragonfly - Advanced Live Search scored 84% from 54 tests.

About plugin

  • Plugin page: dragonfly
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Dec 21, 2018
  • Latest release: Dec 29, 2018
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: 8webit1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,048 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.49MB] [CPU: ▼10.07ms] Passed 4 tests

A check of server-side resources used by Dragonfly - Advanced Live Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3053.51 ▲12.43
Dashboard /wp-admin3.47 ▲0.1745.10 ▼0.24
Posts /wp-admin/edit.php3.59 ▲0.2346.48 ▲1.24
Add New Post /wp-admin/post-new.php3.35 ▼2.5338.20 ▼53.69
Media Library /wp-admin/upload.php3.39 ▲0.1748.03 ▲14.55

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

Browser metrics Passed 4 tests

An overview of browser requirements for Dragonfly - Advanced Live Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.33 ▼0.956.04 ▲4.3742.50 ▲2.37
Dashboard /wp-admin2,221 ▲334.95 ▲0.0895.54 ▼16.9481.86 ▲36.13
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0533.21 ▼3.8533.74 ▲1.69
Add New Post /wp-admin/post-new.php1,680 ▲14721.78 ▼1.54740.33 ▲72.0348.68 ▼0.21
Media Library /wp-admin/upload.php1,400 ▲94.24 ▼0.0198.04 ▼0.7672.43 ▲27.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Trait '_8webit\\Dragonfly\\Common\\_InstanceTrait' not found in wp-content/plugins/dragonfly/src/_8webit/Dragonfly/Frontend/Shortcode.php on line 12
    • > PHP Fatal error
      Trait '_8webit\\Dragonfly\\Common\\_InstanceTrait' not found in wp-content/plugins/dragonfly/src/_8webit/Dragonfly/Admin/Register_Settings.php on line 15
    • > PHP Fatal error
      Trait '_8webit\\Dragonfly\\Common\\_InstanceTrait' not found in wp-content/plugins/dragonfly/src/_8webit/Dragonfly/Admin/Menu.php on line 17
    • > PHP Fatal error
      Trait '_8webit\\Dragonfly\\Common\\_InstanceTrait' not found in wp-content/plugins/dragonfly/src/_8webit/Dragonfly/Common/Enqueue_Scripts.php on line 11
    • > PHP Fatal error
      Trait '_8webit\\Dragonfly\\Common\\_InstanceTrait' not found in wp-content/plugins/dragonfly/src/_8webit/Dragonfly/Frontend/Handlers/Search.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: ajax search, live search, search woocommerce product by sku, woocomerce search, woocommerce...

dragonfly/dragonfly.php 92% from 13 tests

The primary PHP file in "Dragonfly - Advanced Live Search" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7.0" instead of "2.2.0")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin11,288 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
JSON4006,455
PHP264307881,832
CSS2130301,169
JavaScript231942161,145
Sass16200686
SVG1001

PHP code Passed 2 tests

Analyzing 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.20
Average class complexity7.30
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits1
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods121
▷ Static methods8267.77%
▷ Public methods8771.90%
▷ Protected methods00.00%
▷ Private methods3428.10%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/blank.png20.63KB8.16KB▼ 60.43%
assets/admin/img/logo.png10.87KB5.39KB▼ 50.42%
assets/admin/img/menu-icon.png0.44KB0.44KB0.00%