84% simple-search-rewrite

Code Review | Simple Search Rewrite

WordPress plugin Simple Search Rewrite scored84%from 54 tests.

About plugin

  • Plugin page: simple-search-rew...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.4
  • WordPress version: 6.3.1
  • First release: Dec 20, 2015
  • Latest release: Dec 20, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: craigsimps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,146 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.00MB] [CPU: ▼1.83ms] Passed 4 tests

Server-side resources used by Simple Search Rewrite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.27 ▼0.62
Dashboard /wp-admin3.31 ▲0.0046.19 ▲1.26
Posts /wp-admin/edit.php3.36 ▲0.0046.08 ▼0.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.51 ▼7.03
Media Library /wp-admin/upload.php3.23 ▲0.0034.18 ▲0.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Search Rewrite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.20 ▼0.972.05 ▼0.0246.36 ▲2.39
Dashboard /wp-admin2,200 ▲124.84 ▼0.05128.32 ▲26.8040.23 ▼5.41
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0035.08 ▼2.8733.60 ▼2.90
Add New Post /wp-admin/post-new.php1,513 ▼2017.60 ▼5.53579.58 ▼48.6458.07 ▲4.25
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0499.34 ▼4.0541.22 ▼2.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 take a closer look at 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 D2\\SimpleSearchRewrite\\add_action() in wp-content/plugins/simple-search-rewrite/simple-search-rewrite.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: rewrite, permalinks, search

simple-search-rewrite/simple-search-rewrite.php Passed 13 tests

The main PHP file in "Simple Search Rewrite" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
Redirects search results from /?s=query to /search/query/, converts %20 to +.

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
There were no executable files found in this plugin45 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP285325
Markdown19020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.70
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
Namespaces1
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin