84% ts-search-slug

Code Review | TS Search Slug

WordPress plugin TS Search Slug scored84%from 54 tests.

About plugin

  • Plugin page: ts-search-slug
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: May 1, 2018
  • Latest release: Jul 26, 2022
  • Number of updates: 7
  • Update frequency: every 221.0 days
  • Top authors: tsinf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by TS Search Slug
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.08 ▼0.20
Dashboard /wp-admin3.35 ▲0.0144.59 ▼15.64
Posts /wp-admin/edit.php3.40 ▲0.0546.79 ▼0.15
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.33 ▼16.33
Media Library /wp-admin/upload.php3.27 ▲0.0434.90 ▲2.22
TS Search Slug /wp-admin/options-general.php?page=ts_search_slug3.2429.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TS Search Slug
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.181.64 ▼0.0739.88 ▼1.37
Dashboard /wp-admin2,207 ▲195.79 ▲0.9095.89 ▼8.3440.35 ▼4.28
Posts /wp-admin/edit.php2,120 ▲311.97 ▼0.0439.95 ▲4.7534.44 ▲1.15
Add New Post /wp-admin/post-new.php1,536 ▲223.21 ▲0.18656.36 ▲19.1852.04 ▼7.01
Media Library /wp-admin/upload.php1,386 ▼24.24 ▲0.0295.57 ▼13.4840.67 ▼6.27
TS Search Slug /wp-admin/options-general.php?page=ts_search_slug7722.0623.8226.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-search-slug/plugin.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

ts-search-slug/plugin.php 92% from 13 tests

"TS Search Slug" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ts-search-slug.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin163 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23834163

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods990.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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 files were detected