10% triptrus-search-widget

Code Review | TripTrus Search

WordPress plugin TripTrus Search scored10%from 54 tests.

About plugin

  • Plugin page: triptrus-search-w...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jul 12, 2014
  • Latest release: Dec 19, 2014
  • Number of updates: 6
  • Update frequency: every 26.7 days
  • Top authors: triptrus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/triptrus-search-widget/triptrus-search.php+111
    Function create_function() is deprecated

Server metrics [RAM: ▼1.92MB] [CPU: ▼55.76ms] Passed 4 tests

An overview of server-side resources used by TripTrus Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.62 ▼37.08
Dashboard /wp-admin2.10 ▼1.255.65 ▼48.92
Posts /wp-admin/edit.php2.10 ▼1.265.22 ▼38.19
Add New Post /wp-admin/post-new.php2.10 ▼3.797.05 ▼98.86
Media Library /wp-admin/upload.php2.10 ▼1.136.33 ▼27.78

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_triptrus_search
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for TripTrus Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.181.82 ▲0.0544.65 ▼0.36
Dashboard /wp-admin2,203 ▲155.83 ▲0.94100.49 ▼7.9438.44 ▲0.61
Posts /wp-admin/edit.php2,086 ▼62.01 ▼0.0435.94 ▼6.9931.76 ▼2.09
Add New Post /wp-admin/post-new.php1,529 ▲723.30 ▲0.13648.19 ▲30.4484.82 ▲22.30
Media Library /wp-admin/upload.php1,385 ▼64.21 ▼0.1398.80 ▼0.3042.75 ▼2.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/triptrus-search-widget/triptrus-search.php+111
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_triptrus_search
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/triptrus-search-widget/triptrus-search.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: indonesia, travel, triptrus

triptrus-search-widget/triptrus-search.php 92% from 13 tests

Analyzing the main PHP file in "TripTrus Search" version 1.1
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("triptrus-search-widget.php" instead of "triptrus-search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected171 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP139100
CSS10071

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin