72% iki-toolkit

Code Review | Iki Toolkit

WordPress plugin Iki Toolkit scored72%from 54 tests.

About plugin

  • Plugin page: iki-toolkit
  • Plugin version: 1.2.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2017
  • Latest release: Apr 9, 2019
  • Number of updates: 43
  • Update frequency: every 17.6 days
  • Top authors: iki_xx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▼5.48ms] Passed 4 tests

A check of server-side resources used by Iki Toolkit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2541.43 ▲3.88
Dashboard /wp-admin3.56 ▲0.2648.90 ▲1.25
Posts /wp-admin/edit.php3.62 ▲0.2648.13 ▼2.06
Add New Post /wp-admin/post-new.php6.17 ▲0.2879.78 ▼22.79
Media Library /wp-admin/upload.php3.49 ▲0.2635.27 ▲1.67
Add new /wp-admin/post-new.php?post_type=iki_wonder_grid3.4334.57
All grids /wp-admin/edit.php?post_type=iki_wonder_grid3.5334.14
Iki Toolkit /wp-admin/options-general.php?page=iki_toolkit_options3.3928.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 213 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_iki_content_block
db_upgraded
widget_iki-recent-posts-thumbs
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Iki Toolkit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲19913.72 ▼0.596.49 ▲4.5539.84 ▼6.16
Dashboard /wp-admin2,241 ▲535.89 ▼0.01102.50 ▼1.1437.58 ▼7.12
Posts /wp-admin/edit.php2,127 ▲352.09 ▲0.0835.98 ▼3.4732.69 ▼1.59
Add New Post /wp-admin/post-new.php1,547 ▲3323.10 ▲5.45676.85 ▲61.2651.20 ▼3.69
Media Library /wp-admin/upload.php1,429 ▲414.33 ▲0.0495.59 ▼1.6942.90 ▼0.20
Add new /wp-admin/post-new.php?post_type=iki_wonder_grid1,6782.9255.8764.16
All grids /wp-admin/edit.php?post_type=iki_wonder_grid1,0912.0833.1530.68
Iki Toolkit /wp-admin/options-general.php?page=iki_toolkit_options9382.3123.6924.76

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
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_iki-recent-posts-thumbs
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_iki_content_block
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=iki_wonder_grid
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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 take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/iki-toolkit/partials/external-services/flickr-thumb.php
    • > /wp-content/plugins/iki-toolkit/partials/external-services/pinterest-thumb.php
  • 128× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/iki-toolkit/includes/vc/vc-utils.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iki-toolkit/includes/admin-settings/featured-posts/class-search-posts-ajax.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_format() in wp-content/plugins/iki-toolkit/partials/vc/post-slider/post-slider-full-image.php:23
    • > PHP Notice
      Trying to get property 'post_type' of non-object in wp-content/plugins/iki-toolkit/partials/vc/post-listing/post-listing-full-image.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iki-toolkit/includes/vc/class-share-icons.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iki-toolkit/includes/vc/class-theme-social-profiles.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iki-toolkit/includes/vc/class-image-grid-vc.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Iki_Toolkit_Utils' not found in wp-content/plugins/iki-toolkit/partials/hero-section/read-more-btn.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function iki_toolkit() in wp-content/plugins/iki-toolkit/partials/hero-section/hs-blog.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/iki-toolkit/partials/vc/post-slider/post-slider.php on line 41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: iki_xx, toolkit, iki-themes, ikithemes

iki-toolkit/iki-toolkit.php Passed 13 tests

Analyzing the main PHP file in "Iki Toolkit" version 1.2.11
90 characters long description:
The Iki Toolkit extends functionality to Iki Themes, providing custom post types and more.

Code Analysis 97% from 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 detected27,118 lines of code in 173 files:
LanguageFilesBlank linesComment linesLines of code
PHP1385,5805,28220,905
CSS12519593,050
JavaScript191,0811162,994
Sass3284130
SVG127039

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.68
▷ Minimum class complexity1.00
▷ Maximum class complexity474.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes88
▷ Abstract classes55.68%
▷ Concrete classes8394.32%
▷ Final classes00.00%
Methods803
▷ Static methods789.71%
▷ Public methods49962.14%
▷ Protected methods28535.49%
▷ Private methods192.37%
Functions165
▷ Named functions16499.39%
▷ Anonymous functions10.61%
Constants11
▷ Global constants327.27%
▷ Class constants872.73%
▷ Public constants8100.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
32 PNG files occupy 0.51MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/vc/icons/image-grid.png0.72KB0.46KB▼ 36.59%
images/front/pattern-overlays/horizontal-stripes.png0.11KB0.10KB▼ 10.71%
images/front/pattern-overlays/vertical-stripes.png0.11KB0.10KB▼ 12.50%
images/front/pattern-overlays/squares.png0.13KB0.10KB▼ 20.93%
images/front/pattern-overlays/dots.png0.12KB0.10KB▼ 18.11%