90% single-post-search-result

Code Review | Single Post Search Result

WordPress plugin Single Post Search Result scored90%from 54 tests.

About plugin

  • Plugin page: single-post-searc...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 31, 2014
  • Latest release: Oct 11, 2016
  • Number of updates: 4
  • Update frequency: every 203.0 days
  • Top authors: stuartduff (75%)wpskeleton (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,178 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.16MB] [CPU: ▼11.92ms] Passed 4 tests

Server-side resources used by Single Post Search Result
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6320.37 ▼23.53
Dashboard /wp-admin3.31 ▲0.0054.05 ▲0.38
Posts /wp-admin/edit.php3.36 ▲0.0050.07 ▼2.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.54 ▼19.62
Media Library /wp-admin/upload.php3.23 ▲0.0039.28 ▼2.03

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Single Post Search Result
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.061.76 ▲0.1545.79 ▲4.25
Dashboard /wp-admin2,195 ▲215.60 ▲0.0394.81 ▲4.5145.02 ▲6.27
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0535.32 ▼5.5033.74 ▼3.74
Add New Post /wp-admin/post-new.php1,526 ▼023.60 ▲0.53663.48 ▼27.4258.84 ▲5.41
Media Library /wp-admin/upload.php1,394 ▼34.18 ▼0.0197.17 ▼29.8141.26 ▼7.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: search results, search redirect, plugin, plugins, search

single-post-search-result/single-post-search-result.php Passed 13 tests

"Single Post Search Result" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
125 characters long description:
This Plugin will redirect any search results that only have a single post to the single post that was returned in the search.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172411

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.75
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin