62% kumihimo

Code Review | Kumihimo

WordPress plugin Kumihimo scored62%from 54 tests.

About plugin

  • Plugin page: kumihimo
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Jun 15, 2017
  • Latest release: Aug 22, 2018
  • Number of updates: 10
  • Update frequency: every 43.4 days
  • Top authors: fu94ma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /842 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.49MB] [CPU: ▼27.66ms] Passed 4 tests

Analyzing server-side resources used by Kumihimo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4142.68 ▲0.71
Dashboard /wp-admin3.46 ▲0.1530.44 ▼20.89
Posts /wp-admin/edit.php3.46 ▲0.1028.43 ▼17.48
Add New Post /wp-admin/post-new.php3.46 ▼2.4325.98 ▼65.54
Media Library /wp-admin/upload.php3.46 ▲0.2327.29 ▼6.74
Content Indexing /wp-admin/admin.php?page=kumihimo&tab=content3.4628.11
Server Settings /wp-admin/admin.php?page=kumihimo&tab=server3.4627.83
Manage Index /wp-admin/admin.php?page=kumihimo&tab=index3.4630.08
Wordpress Integration /wp-admin/admin.php?page=kumihimo&tab=integration3.4628.14
/wp-admin/admin.php?page=kumihimo3.4626.08
Result Scoring /wp-admin/admin.php?page=kumihimo&tab=scoring3.4628.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 872 new files
Database: no new tables, 10 new options
New WordPress options
widget_facetingoptionswidget
kumihimo
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_factingselectedwidget
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for Kumihimo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13314.48 ▲0.312.08 ▲0.0441.51 ▼4.63
Dashboard /wp-admin2,237 ▲495.85 ▲0.95112.13 ▲11.8369.50 ▲25.88
Posts /wp-admin/edit.php2,138 ▲461.99 ▼0.0237.46 ▼5.1935.16 ▲0.54
Add New Post /wp-admin/post-new.php45 ▼1,4890.44 ▼22.790.14 ▼683.219.22 ▼49.91
Media Library /wp-admin/upload.php1,428 ▲374.25 ▲0.0296.57 ▼9.4571.71 ▲27.06
Content Indexing /wp-admin/admin.php?page=kumihimo&tab=content1,2442.3333.7038.79
Server Settings /wp-admin/admin.php?page=kumihimo&tab=server1,2292.2332.4337.33
Manage Index /wp-admin/admin.php?page=kumihimo&tab=index1,2262.2332.7035.48
Wordpress Integration /wp-admin/admin.php?page=kumihimo&tab=integration1,2292.3640.8234.68
/wp-admin/admin.php?page=kumihimo1,2052.1325.9127.63
Result Scoring /wp-admin/admin.php?page=kumihimo&tab=scoring1,2262.3334.5737.77

Uninstaller [IO: ▲0.00MB] [DB: ▼0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/kumihimo/wp/lib/nhp/options/options.php+226
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 9 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_facetingoptionswidget
    • widget_factingselectedwidget
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 684 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kumihimo&tab=scoring
    • > Deprecated in wp-content/plugins/kumihimo/wp/lib/nhp/options/options.php+237
    Function create_function() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/kumihimo/vendor/electrolinux/phpquery/demo.php
    • > /wp-content/plugins/kumihimo/vendor/jeremykendall/php-domain-parser/tests/bootstrap.php
  • 309× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Elastica\\Filter\\AbstractFilter' not found in wp-content/plugins/kumihimo/vendor/ruflin/elastica/lib/Elastica/Filter/AbstractGeoDistance.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/kumihimo/vendor/ruflin/elastica/lib/Elastica/Log.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Elastica\\Aggregation\\AbstractSimpleAggregation' not found in wp-content/plugins/kumihimo/vendor/ruflin/elastica/lib/Elastica/Aggregation/Stats.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Elastica\\Aggregation\\AbstractSimpleAggregation' not found in wp-content/plugins/kumihimo/vendor/ruflin/elastica/lib/Elastica/Aggregation/Max.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Elastica\\Query\\AbstractQuery' not found in wp-content/plugins/kumihimo/vendor/ruflin/elastica/lib/Elastica/Query/Boosting.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Purl\\AbstractPart' not found in wp-content/plugins/kumihimo/vendor/jwage/purl/src/Purl/Path.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/kumihimo/vendor/jwage/purl/tests/Purl/Test/ParserTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'NHP_Options' not found in wp-content/plugins/kumihimo/wp/lib/nhp/options/fields/tags_select/field_tags_select.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/kumihimo/vendor/jeremykendall/php-domain-parser/tests/library/Pdp/PublicSuffixListManagerTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Elastica\\Aggregation\\AbstractAggregation' not found in wp-content/plugins/kumihimo/vendor/ruflin/elastica/lib/Elastica/Aggregation/IpRange.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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 require attention:
  • Screenshots: Please add images for these screenshots: #1 (Configure your ElasticServer settings), #2 (Determine what data you want to index), #3 (Alter the result scoring behavior), #4 (Wipe and re-index data is available if needed)
You can take inspiration from this readme.txt

kumihimo/kumihimo.php Passed 13 tests

The main PHP script in "Kumihimo" version 1.0.2 is automatically included on every request by WordPress
60 characters long description:
Replace the WordPresss standard search with a Elasticsearch.

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
Everything looks great! No dangerous files found in this plugin80,155 lines of code in 478 files:
LanguageFilesBlank linesComment linesLines of code
PHP3895,40717,73659,735
HTML231,299014,142
JavaScript137155162,479
Markdown1249601,380
CSS41331701,067
XML13130485
JSON800312
Ant2296232
make13622125
YAML73224117
Dockerfile4201843
Bourne Shell18937
Groovy1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.05
▷ Minimum class complexity1.00
▷ Maximum class complexity558.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces38
Interfaces11
Traits2
Classes358
▷ Abstract classes298.10%
▷ Concrete classes32991.90%
▷ Final classes00.00%
Methods2,235
▷ Static methods1828.14%
▷ Public methods2,10694.23%
▷ Protected methods1205.37%
▷ Private methods90.40%
Functions47
▷ Named functions2144.68%
▷ Anonymous functions2655.32%
Constants187
▷ Global constants73.74%
▷ Class constants18096.26%
▷ Public constants180100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
364 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wp/lib/nhp/options/img/glyphicons/glyphicons_298_hospital.png0.13KB0.14KB0.00%
wp/lib/nhp/options/img/glyphicons/glyphicons_323_buzz.png0.31KB0.43KB0.00%
wp/lib/nhp/options/img/glyphicons/glyphicons_215_resize_full.png0.24KB0.27KB0.00%
wp/lib/nhp/options/img/glyphicons/glyphicons_194_circle_question_mark.png0.30KB0.31KB0.00%
wp/lib/nhp/options/img/glyphicons/glyphicons_113_justify.png0.10KB0.10KB0.00%