68% kotobee

Code Review | Kotobee Integration

WordPress plugin Kotobee Integration scored68%from 54 tests.

About plugin

  • Plugin page: kotobee
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Jan 20, 2022
  • Latest release: Feb 9, 2022
  • Number of updates: 8
  • Update frequency: every 2.8 days
  • Top authors: kotobee (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

60+ active /838 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.29ms] Passed 4 tests

An overview of server-side resources used by Kotobee Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.80 ▲1.07
Dashboard /wp-admin3.32 ▲0.0245.56 ▼2.20
Posts /wp-admin/edit.php3.44 ▲0.0845.58 ▼5.40
Add New Post /wp-admin/post-new.php5.90 ▲0.02107.88 ▲4.69
Media Library /wp-admin/upload.php3.25 ▲0.0234.35 ▼2.62

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, 8 new options
New tables
wp_kotobee_integration
New WordPress options
theysaidso_admin_options
kotobee_integration_sendEmail
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
kotobee_integration_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Kotobee Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8513.21 ▼1.382.04 ▲0.2437.79 ▼11.12
Dashboard /wp-admin2,229 ▲444.94 ▼0.92111.63 ▲1.7374.94 ▲27.29
Posts /wp-admin/edit.php2,105 ▲162.02 ▲0.0440.45 ▼7.8337.62 ▼2.03
Add New Post /wp-admin/post-new.php1,533 ▲1923.15 ▲5.55707.76 ▲8.1550.31 ▼13.15
Media Library /wp-admin/upload.php1,405 ▲204.28 ▼0.0297.32 ▼57.6174.47 ▲18.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_kotobee_integration
  • This plugin does not fully uninstall, leaving 8 options in the database
    • kotobee_integration_sendEmail
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • kotobee_integration_db_version
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/kotobee/admin/content/memberful-memberfulProduct-intro.php
    • > /wp-content/plugins/kotobee/admin/content/memberful-memberfulPlan-intro.php
    • > /wp-content/plugins/kotobee/admin/metabox-html.php
    • > /wp-content/plugins/kotobee/admin/content/woocommerce-wooProduct-intro.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'KotobeeIntegration' not found in wp-content/plugins/kotobee/classes/KotobeeWoocommerceIntegration.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kotobee/admin/global-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'KotobeeMemberfulIntegration' not found in wp-content/plugins/kotobee/admin/settings/memberful.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/kotobee/kotobee.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'KotobeeIntegration' not found in wp-content/plugins/kotobee/classes/KotobeeMemberfulIntegration.php:3

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: memberful, sell, woocommerce, ebooks, publishing

kotobee/kotobee.php 85% from 13 tests

The main PHP script in "Kotobee Integration" version 1.5.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 431 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,337 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP142412882,009
JavaScript12067187
PO File16075141

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity62.50
▷ Minimum class complexity39.00
▷ Maximum class complexity111.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods4350.59%
▷ Protected methods2630.59%
▷ Private methods1618.82%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/memberful.png13.48KB4.09KB▼ 69.64%
images/woocommerce.png8.45KB4.23KB▼ 49.90%