82% blobinator

Code Review | KONTXT Content Advisor

WordPress plugin KONTXT Content Advisor scored 82% from 54 tests.

About plugin

  • Plugin page: blobinator
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 5.9.2
  • First release: Jan 3, 2017
  • Latest release: Jun 23, 2021
  • Number of updates: 84
  • Update frequency: every 19.4 days
  • Top authors: mbordash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active / 7,801 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.37MB] [CPU: ▼310.08ms] Passed 4 tests

Server-side resources used by KONTXT Content Advisor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0266.07 ▲12.53
Dashboard /wp-admin3.22 ▼0.1920.08 ▼13.58
Posts /wp-admin/edit.php3.28 ▼0.3622.44 ▼15.27
Add New Post /wp-admin/post-new.php6.07 ▼0.9072.98 ▼1,205.60
Media Library /wp-admin/upload.php3.25 ▼0.0518.64 ▼5.87
KONTXT /wp-admin/options-general.php?page=blobinator3.2119.30

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by KONTXT Content Advisor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,071 ▲31727.21 ▲11.4215.41 ▲9.152.29 ▼0.16
Dashboard /wp-admin3,048 ▲19014.95 ▲8.75334.75 ▲197.33191.72 ▲30.72
Posts /wp-admin/edit.php2,874 ▲18312.95 ▲9.59137.55 ▲72.74138.20 ▼4.84
Add New Post /wp-admin/post-new.php1,705 ▼1820.83 ▼0.38248.29 ▼211.89155.46 ▼1.19
Media Library /wp-admin/upload.php1,824 ▲12614.68 ▲9.18169.08 ▲11.31186.24 ▼5.05
KONTXT /wp-admin/options-general.php?page=blobinator1,28712.55160.37131.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=blobinator
    • > Warning in wp-content/plugins/blobinator/admin/class-blobinator-admin.php+106
    filemtime() expects exactly 1 parameter, 0 given

SRP 50% 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
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/blobinator/public/partials/blobinator-sentiment-div.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/blobinator/admin/partials/blobinator-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/blobinator/public/partials/blobinator-emotion-div.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/blobinator/admin/partials/blobinator-analyze-display-modal.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/blobinator/admin/partials/blobinator-analyze-display-box.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/blobinator/admin/partials/modal-blobinator-analyze-display.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=blobinator
    • > Console-api (warning) in wp-includes/js/dist/deprecated.min.js?ver=8778985ac0dfb16f24f8ef86d0718f43+1:1537
    wp.compose.withState is deprecated. Please use wp.element.useState instead.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === blobinator === )
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

blobinator/blobinator.php 92% from 13 tests

The principal PHP file in "KONTXT Content Advisor" v. 3.1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,619 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP184619191,217
JavaScript613716377
CSS581525

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity22.00
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods78
▷ Static methods33.85%
▷ Public methods7292.31%
▷ Protected methods00.00%
▷ Private methods67.69%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
admin/css/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%
admin/js/images/blobinator_button.png4.12KB0.83KB▼ 79.77%
admin/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
admin/css/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%