90% posts-search

Code Review | Posts Search

WordPress plugin Posts Search scored90%from 54 tests.

About plugin

  • Plugin page: posts-search
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Jan 23, 2021
  • Latest release: Jun 12, 2022
  • Number of updates: 11
  • Update frequency: every 46.0 days
  • Top authors: takashimatsuyama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /655 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.13ms] Passed 4 tests

Server-side resources used by Posts Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.57 ▲2.46
Dashboard /wp-admin3.41 ▲0.1145.32 ▼1.46
Posts /wp-admin/edit.php3.52 ▲0.1749.26 ▼1.99
Add New Post /wp-admin/post-new.php5.99 ▲0.10100.79 ▲15.45
Media Library /wp-admin/upload.php3.33 ▲0.1035.83 ▲1.51

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Posts Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲11413.74 ▼0.908.23 ▲6.5844.81 ▲4.99
Dashboard /wp-admin2,198 ▲315.59 ▼0.0588.18 ▼5.0642.98 ▲5.48
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0440.12 ▲5.4636.98 ▼0.99
Add New Post /wp-admin/post-new.php1,531 ▲323.00 ▲0.16590.02 ▼90.2653.85 ▼25.16
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0092.56 ▼16.5339.46 ▼7.82

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
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

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

The main PHP file in "Posts Search" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
55 characters long description:
Search posts by taxonomy terms and post type with Ajax.

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 detected1,211 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP99482646
CSS31414300
JavaScript22965152
PO File1172159
Markdown123042
SVG10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.38
▷ Minimum class complexity4.00
▷ Maximum class complexity34.00
Average method complexity5.79
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods19
▷ Static methods1157.89%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG files were detected