84% talash

Code Review | Talash - Advanced Search Plugin

WordPress plugin Talash - Advanced Search Plugin scored84%from 54 tests.

About plugin

  • Plugin page: talash
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Sep 2, 2021
  • Latest release: Jan 7, 2022
  • Number of updates: 17
  • Update frequency: every 7.5 days
  • Top authors: sourav926 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /858 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼9.64ms] Passed 4 tests

An overview of server-side resources used by Talash - Advanced Search Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3340.99 ▲1.42
Dashboard /wp-admin3.66 ▲0.3150.59 ▼11.07
Posts /wp-admin/edit.php3.71 ▲0.3549.59 ▼3.20
Add New Post /wp-admin/post-new.php6.17 ▲0.2984.84 ▼24.87
Media Library /wp-admin/upload.php3.52 ▲0.2935.67 ▲0.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Talash - Advanced Search Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.57 ▼0.8311.30 ▲9.3441.77 ▼1.94
Dashboard /wp-admin2,195 ▲185.64 ▼0.0586.36 ▼33.5037.23 ▼8.35
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0335.72 ▼7.5133.46 ▼2.75
Add New Post /wp-admin/post-new.php1,526 ▼1417.51 ▼5.64655.54 ▼24.2562.88 ▲11.84
Media Library /wp-admin/upload.php1,403 ▼04.24 ▲0.0496.65 ▼9.8745.18 ▼0.40

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require(): Failed opening required 'TALASH_DIR_PATHadmin/customizer/controls/partials/input-field.php' (include_path='.:/usr/share/php') in wp-content/plugins/talash/admin/customizer/controls/talash-controls.php on line 2
    • > PHP Warning
      Use of undefined constant TALASH_DIR_PATH - assumed 'TALASH_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/talash/admin/customizer/controls/talash-controls.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/talash/admin/customizer/custom-controls/heading-control.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/talash/admin/customizer/style.php:17
    • > PHP Warning
      require(TALASH_DIR_PATHadmin/customizer/controls/partials/input-field.php): failed to open stream: No such file or directory in wp-content/plugins/talash/admin/customizer/controls/talash-controls.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/talash/public/template.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
7 plugin tags: advanced-search, cpt, advanced, post, search...

talash/talash.php 85% from 13 tests

The main file in "Talash - Advanced Search Plugin" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 217 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

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
No dangerous file extensions were detected4,126 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP233121531,843
JavaScript53521831,379
CSS31202904

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.21
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods77
▷ Static methods5267.53%
▷ Public methods6381.82%
▷ Protected methods00.00%
▷ Private methods1418.18%
Functions15
▷ Named functions1386.67%
▷ Anonymous functions213.33%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/talash-placeholder.png2.57KB1.43KB▼ 44.50%
assets/wp-assets/banner-1544x500.png107.23KB40.68KB▼ 62.07%
assets/wp-assets/banner-772x259.png45.96KB17.34KB▼ 62.27%