78% kiwys

Code Review | Kiwys

WordPress plugin Kiwys scored78%from 54 tests.

About plugin

  • Plugin page: kiwys
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.7-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2020
  • Latest release: Aug 20, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: kiwys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /427 total downloads

Benchmarks

Plugin footprint 83% 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.09MB] [CPU: ▼5.20ms] Passed 4 tests

Analyzing server-side resources used by Kiwys
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.25 ▼8.98
Dashboard /wp-admin3.40 ▲0.1047.07 ▼2.15
Posts /wp-admin/edit.php3.52 ▲0.1650.73 ▲1.19
Add New Post /wp-admin/post-new.php6.00 ▲0.1187.74 ▼10.87
Media Library /wp-admin/upload.php3.33 ▲0.0939.79 ▲3.96

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Kiwys
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.96 ▲0.411.72 ▼0.1340.19 ▼3.43
Dashboard /wp-admin2,240 ▲636.94 ▲1.25105.73 ▲13.7640.27 ▼5.94
Posts /wp-admin/edit.php2,145 ▲453.80 ▲1.7649.40 ▲9.3236.80 ▲0.83
Add New Post /wp-admin/post-new.php6,472 ▲5,10326.51 ▲9.72965.73 ▲362.5141.57 ▼9.02
Media Library /wp-admin/upload.php1,445 ▲456.52 ▲2.29116.45 ▲4.1243.40 ▼4.38

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/kiwys/public/partials/kiwys-lite-public-display.php
    • > /wp-content/plugins/kiwys/admin/partials/kiwys-lite-admin-display-no-website.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/kiwys/admin/partials/kiwys-lite-admin-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/kiwys/admin/partials/kiwys-lite-admin-display-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/kiwys/admin/partials/kiwys-lite-admin-display-login.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/kiwys/admin/partials/kiwys-lite-admin-display-website-state.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/kiwys/admin/partials/kiwys-lite-admin-display-header.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/kiwys/admin/partials/kiwys-lite-admin-display-metrics.php:1

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

kiwys/kiwys-lite.php 85% from 13 tests

Analyzing the main PHP file in "Kiwys" version 1.0.1
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kiwys.php" instead of "kiwys-lite.php")

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
No dangerous file extensions were detected820 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP19151593759
CSS310454
JavaScript34587

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3175.61%
▷ Protected methods00.00%
▷ Private methods1024.39%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants16.67%
▷ Class constants1493.33%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/logo.png3.67KB0.96KB▼ 73.86%