84% doofinder

Code Review | Doofinder

WordPress plugin Doofinder scored84%from 54 tests.

About plugin

  • Plugin page: doofinder
  • Plugin version: 0.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2018
  • Latest release: May 3, 2023
  • Number of updates: 31
  • Update frequency: every 56.5 days
  • Top authors: doofinder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.18ms] Passed 4 tests

Server-side resources used by Doofinder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.88 ▲2.26
Dashboard /wp-admin3.36 ▲0.0648.99 ▲2.10
Posts /wp-admin/edit.php3.47 ▲0.1246.50 ▼4.45
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.53 ▼8.64
Media Library /wp-admin/upload.php3.28 ▲0.0537.16 ▲4.11
Doofinder /wp-admin/admin.php?page=doofinder_for_wp3.2532.27
Index Posts /wp-admin/admin.php?page=index_posts3.2531.52

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Doofinder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.18 ▼1.211.72 ▲0.0443.94 ▼0.57
Dashboard /wp-admin2,233 ▲454.87 ▼1.0199.73 ▼2.1942.97 ▲0.98
Posts /wp-admin/edit.php2,116 ▲272.05 ▼0.0134.86 ▼5.9135.05 ▼0.75
Add New Post /wp-admin/post-new.php6,251 ▲4,71719.02 ▼4.22928.21 ▲246.6362.37 ▼1.99
Media Library /wp-admin/upload.php1,415 ▲274.19 ▲0.03106.50 ▼1.0447.75 ▲1.96
Doofinder /wp-admin/admin.php?page=doofinder_for_wp9212.0221.9931.06
Index Posts /wp-admin/admin.php?page=index_posts7911.7124.9425.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Doofinder\\WP\\Api\\Management\\AggregatesIterator' not found in wp-content/plugins/doofinder/lib/src/Management/TopTermsIterator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/doofinder/lib/src/Test/Search/ClientTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/doofinder/lib/src/Test/Search/ResultsTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Doofinder\\WP\\Api\\Management\\ItemsResultSet' not found in wp-content/plugins/doofinder/lib/src/Management/AggregatesIterator.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Doofinder\\WP\\Post_Types' not found in wp-content/plugins/doofinder/views/wizard-step-2.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/doofinder/includes/settings/attributes.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Doofinder\\WP\\Multilanguage\\Language_Plugin' not found in wp-content/plugins/doofinder/includes/multilanguage/class-no-language-plugin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/doofinder/lib/src/Test/Management/TopTermsIteratorTest.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Doofinder\\WP\\admin_url() in wp-content/plugins/doofinder/views/wizard-step-3.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Doofinder\\WP\\Api\\Management\\ItemsResultSet' not found in wp-content/plugins/doofinder/lib/src/Management/ScrollIterator.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7, #8 in doofinder/assets to your readme.txt
You can look at the official readme.txt

doofinder/doofinder.php Passed 13 tests

The principal PHP file in "Doofinder" v. 0.5.4 is loaded by WordPress automatically on each request
53 characters long description:
Integrate Doofinder Search in your WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin6,894 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP641,6673,2965,766
Markdown21890672
CSS2801235
JavaScript100166
JSON10037
YAML10010
XML1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.88
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces10
Interfaces1
Traits4
Classes53
▷ Abstract classes11.89%
▷ Concrete classes5298.11%
▷ Final classes00.00%
Methods433
▷ Static methods6414.78%
▷ Public methods31071.59%
▷ Protected methods102.31%
▷ Private methods11326.10%
Functions54
▷ Named functions11.85%
▷ Anonymous functions5398.15%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.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
PNG images were not found in this plugin