10% komper

Code Review | Komper

WordPress plugin Komper scored 10% from 54 tests.

About plugin

  • Plugin page: komper
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 5.8.1
  • First release: Dec 3, 2012
  • Latest release: Dec 12, 2012
  • Number of updates: 20
  • Update frequency: every 0.7 days
  • Top authors: vandai (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active / 6,892 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/komper/komper.php+302
    Function create_function() is deprecated

Server metrics [RAM: ▼1.88MB] [CPU: ▼195.30ms] Passed 4 tests

Server-side resources used by Komper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.75 ▼0.974.31 ▼21.45
Dashboard /wp-admin1.77 ▼1.294.99 ▼41.27
Posts /wp-admin/edit.php1.77 ▼1.345.54 ▼42.84
Add New Post /wp-admin/post-new.php1.77 ▼3.675.21 ▼662.57
Media Library /wp-admin/upload.php1.77 ▼1.244.93 ▼34.51
Komper Settings /wp-admin/options-general.php?page=Komper1.774.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 36 new files
Database: 3 new tables, 3 new options
New tables
wp_komper_value
wp_komper_field
wp_komper_product
New WordPress options
recovery_mode_email_last_sent
komper_db_version
widget_komper

Browser metrics Passed 4 tests

This is an overview of browser requirements for Komper
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,687 ▲9115.96 ▲0.489.18 ▼2.1248.44 ▼3.21
Dashboard /wp-admin2,978 ▲476.63 ▲0.56146.24 ▼11.03117.54 ▼3.96
Posts /wp-admin/edit.php2,747 ▲82.51 ▼0.1878.33 ▲9.76100.66 ▲3.21
Add New Post /wp-admin/post-new.php1,621 ▼6221.47 ▲5.11275.74 ▼111.05108.84 ▼3.77
Media Library /wp-admin/upload.php1,815 ▲85.37 ▲0.37174.48 ▲23.13124.22 ▼10.65
Komper Settings /wp-admin/options-general.php?page=Komper8772.3042.0551.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/komper/komper.php+302
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_komper_product
    • wp_komper_field
    • wp_komper_value
  • This plugin did not uninstall successfully, leaving 3 options in the database
    • recovery_mode_email_last_sent
    • komper_db_version
    • widget_komper

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > Deprecated in wp-content/plugins/komper/komper.php+302
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > Warning in wp-content/plugins/komper/komper.php+445
    Use of undefined constant list_fieldtype - assumed 'list_fieldtype' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > Warning in wp-content/plugins/komper/komper.php+446
    Use of undefined constant list_textformat - assumed 'list_textformat' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > Warning in wp-content/plugins/komper/komper.php+447
    Use of undefined constant format_text - assumed 'format_text' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > Notice in wp-content/plugins/komper/komper.php+448
    Undefined variable: format
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > Notice in wp-content/plugins/komper/komper.php+448
    Undefined variable: text
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Komper is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=Komper
    • > Parse error in wp-content/plugins/komper/komper_admin.php+331
    syntax error, unexpected end of file

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/komper/komper_admin.php on line 331
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/komper/config.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/komper/config.php:23
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/komper/config.php on line 7
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/komper/config.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/komper/config.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/komper/output.php:109
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/komper/config.php on line 6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/komper/config.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/komper/config.php on line 7

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Create product spesification fields), #2 (Product list), #3 (Add product spesification, the field forms based on product specification fields.), #4 (Comparison Form Widget with autocomplete), #5 (Add product comparison table into post / page (Pro version)), #6 (Comparison table chart and form in posts (Pro version)), #7 (Sample output comparison table chart without wordpress header), #8 (Sample output comparison table chart __with__ wordpress header)
The official readme.txt is a good inspiration

komper/komper.php Passed 13 tests

The main PHP file in "Komper" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
113 characters long description:
A plugin to create side-by-side product comparison. This is free version, get the pro version with more features!

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 plugin1,313 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP5121331,239
JavaScript23653
CSS422721

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 1.56MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
assets/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
assets/css/smoothness/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
screenshot-8.png100.17KB31.55KB▼ 68.51%
assets/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%