84% tc-specify-search-form

Code Review | TC Specify Search Form

WordPress plugin TC Specify Search Form scored84%from 54 tests.

About plugin

  • Plugin page: tc-specify-search...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.3
  • WordPress version: 6.3.1
  • First release: Sep 28, 2012
  • Latest release: Aug 15, 2015
  • Number of updates: 6
  • Update frequency: every 175.2 days
  • Top authors: taupecat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,365 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.21ms] Passed 4 tests

This is a short check of server-side resources used by TC Specify Search Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.91 ▼2.23
Dashboard /wp-admin3.32 ▲0.0246.65 ▼2.88
Posts /wp-admin/edit.php3.37 ▲0.0242.91 ▼9.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.22 ▼14.33
Media Library /wp-admin/upload.php3.24 ▲0.0236.29 ▲1.70

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_tc_specify_search_form_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by TC Specify Search Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.071.71 ▼0.4644.87 ▲2.05
Dashboard /wp-admin2,206 ▲185.80 ▲0.6897.55 ▼13.6340.06 ▼1.28
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.0841.43 ▲3.7032.76 ▼0.25
Add New Post /wp-admin/post-new.php1,514 ▼017.63 ▲0.13681.91 ▲53.2971.08 ▲24.54
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.0399.00 ▼1.0346.32 ▲3.59

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_tc_specify_search_form_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-specify-search-form/tc-specify-search-form.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: widget, search form

tc-specify-search-form/tc-specify-search-form.php Passed 13 tests

The entry point to "TC Specify Search Form" version 1.0 is a PHP file that has certain tags in its header comment area
104 characters long description:
Creates a new Search Form widget that allows you to specify which searchform-*.php file you wish to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected68 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2211647
Markdown111021

PHP code Passed 2 tests

A short review 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.05
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin