84% search-shortcode

Code Review | Search shortcode

WordPress plugin Search shortcode scored 84% from 54 tests.

About plugin

  • Plugin page: search-shortcode
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4
  • WordPress version: 6.3.1
  • First release: Feb 14, 2013
  • Latest release: Dec 3, 2015
  • Number of updates: 6
  • Update frequency: every 170.7 days
  • Top authors: mark-k (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 17,331 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.48ms] Passed 4 tests

Server-side resources used by Search shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.49 ▼3.95
Dashboard /wp-admin3.31 ▲0.0043.91 ▼0.40
Posts /wp-admin/edit.php3.36 ▲0.0045.73 ▼4.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.47 ▼13.47
Media Library /wp-admin/upload.php3.23 ▲0.0038.32 ▲1.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Search shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.044.31 ▲2.4845.29 ▲1.05
Dashboard /wp-admin2,200 ▲95.78 ▲0.91100.78 ▼7.4837.45 ▼4.99
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0534.79 ▼5.2431.15 ▼13.41
Add New Post /wp-admin/post-new.php1,537 ▲223.24 ▲0.24655.16 ▲6.7158.06 ▼3.27
Media Library /wp-admin/upload.php1,382 ▼04.20 ▼0.0197.14 ▼2.3342.95 ▼0.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/search-shortcode/search-shortcode.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
1 plugin tags: search

search-shortcode/search-shortcode.php Passed 13 tests

The principal PHP file in "Search shortcode" v. 1.0 is loaded by WordPress automatically on each request
63 characters long description:
Provides a [search] shortcode to insert search form in content.

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
Everything looks great! No dangerous files found in this plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin