74% kenta-companion

Code Review | Kenta Companion

WordPress plugin Kenta Companion scored74%from 54 tests.

About plugin

  • Plugin page: kenta-companion
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Sep 26, 2022
  • Latest release: Oct 22, 2023
  • Number of updates: 31
  • Update frequency: every 13.2 days
  • Top authors: ibllex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /21,128 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
Install script ran successfully

Server metrics [RAM: ▲5.45MB] [CPU: ▲32.53ms] 75% from 4 tests

Analyzing server-side resources used by Kenta Companion
Please take the time to fix the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.45MB on /wp-admin/admin.php?page=kenta-companion)
PageMemory (MB)CPU Time (ms)
Home /9.20 ▲5.7473.76 ▲35.32
Dashboard /wp-admin9.22 ▲5.9181.40 ▲33.64
Posts /wp-admin/edit.php9.22 ▲5.8682.15 ▲32.16
Add New Post /wp-admin/post-new.php10.16 ▲4.27123.86 ▲32.52
Media Library /wp-admin/upload.php9.22 ▲5.9965.01 ▲31.81
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.2270.18
Contact Us /wp-admin/admin.php?page=kenta-companion-contact9.2256.75
Opt In /wp-admin/admin.php?page=kenta-companion-optin9.2262.43
Support Forum /wp-admin/admin.php?page=kenta-companion-wp-support-forum9.2253.31
Upgrade  ➤ /wp-admin/admin.php?page=kenta-companion-pricing9.2263.73
Kenta /wp-admin/admin.php?page=kenta-companion9.2255.30

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 395 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
db_upgraded
fs_active_plugins
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
fs_accounts
theysaidso_admin_options

Browser metrics Passed 4 tests

Kenta Companion: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲10214.39 ▼0.011.72 ▲0.1131.49 ▼10.49
Dashboard /wp-admin2,254 ▲805.59 ▼0.0189.55 ▲3.7778.26 ▲34.75
Posts /wp-admin/edit.php2,175 ▲752.05 ▲0.0335.13 ▼8.0439.03 ▼5.82
Add New Post /wp-admin/post-new.php1,669 ▲14323.64 ▲0.49626.28 ▼10.95113.99 ▲53.51
Media Library /wp-admin/upload.php1,465 ▲654.20 ▼0.0694.87 ▼9.9876.97 ▲33.24
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1151.7124.2627.06
Contact Us /wp-admin/admin.php?page=kenta-companion-contact1,5913.0953.8950.09
Opt In /wp-admin/admin.php?page=kenta-companion-optin1,0281.7024.9966.87
Support Forum /wp-admin/admin.php?page=kenta-companion-wp-support-forum1,3853.9185.6070.03
Upgrade  ➤ /wp-admin/admin.php?page=kenta-companion-pricing1,9213.3160.3988.46
Kenta /wp-admin/admin.php?page=kenta-companion9346.20145.0236.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/kenta-companion/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • fs_debug_mode
    • fs_accounts
    • widget_recent-posts
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/kenta-companion/src/DemoImporter/CustomizerOption.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Cookie\\Factory' not found in wp-content/plugins/kenta-companion/vendor/illuminate/contracts/Cookie/QueueingFactory.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Pagination\\Paginator' not found in wp-content/plugins/kenta-companion/vendor/illuminate/contracts/Pagination/LengthAwarePaginator.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\MessageProvider' not found in wp-content/plugins/kenta-companion/vendor/illuminate/contracts/Validation/Validator.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ProteusThemes\\WPContentImporter2\\WPImporterLogger' not found in wp-content/plugins/kenta-companion/vendor/proteusthemes/wp-content-importer-v2/src/WPImporterLoggerCLI.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/kenta-companion/src/Container/EntryNotFoundException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/kenta-companion/vendor/illuminate/contracts/Container/Container.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheException' not found in wp-content/plugins/kenta-companion/vendor/psr/simple-cache/src/InvalidArgumentException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Container\\Container' not found in wp-content/plugins/kenta-companion/src/Container/Container.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\Arrayable' not found in wp-content/plugins/kenta-companion/vendor/illuminate/contracts/Support/MessageBag.php:5

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, 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
2 plugin tags: widgets, widget

kenta-companion/kenta-companion.php Passed 13 tests

"Kenta Companion" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
124 characters long description:
Kenta Companion is an extension to the Kenta theme. It provides a lot of features and one-click demo import for Kenta Theme.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin49,353 lines of code in 334 files:
LanguageFilesBlank linesComment linesLines of code
PHP29210,40523,67341,365
JavaScript101,6071,3676,644
CSS183912885
JSON600372
Markdown628070
XML13016
SVG1001

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity28.39
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces44
Interfaces91
Traits0
Classes111
▷ Abstract classes21.80%
▷ Concrete classes10998.20%
▷ Final classes10.92%
Methods2,066
▷ Static methods25512.34%
▷ Public methods1,58476.67%
▷ Protected methods904.36%
▷ Private methods39218.97%
Functions139
▷ Named functions12287.77%
▷ Anonymous functions1712.23%
Constants166
▷ Global constants11066.27%
▷ Class constants5633.73%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/archive-masonry.png0.92KB0.13KB▼ 85.93%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/kenta-companion.png3.94KB1.96KB▼ 50.21%
assets/images/archive-grid.png0.99KB0.15KB▼ 84.46%
assets/images/kenta-logo-color.png21.88KB6.44KB▼ 70.55%