73% kama-thumbnail

Code Review | Kama Thumbnail

WordPress plugin Kama Thumbnail scored73%from 54 tests.

About plugin

  • Plugin page: kama-thumbnail
  • Plugin version: 3.5.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2015
  • Latest release: Mar 22, 2023
  • Number of updates: 211
  • Update frequency: every 13.2 days
  • Top authors: Tkama (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

10,000+ active /111,867 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.74ms] Passed 4 tests

An overview of server-side resources used by Kama Thumbnail
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.11 ▼1.23
Dashboard /wp-admin3.33 ▲0.0346.53 ▼1.66
Posts /wp-admin/edit.php3.38 ▲0.0345.14 ▼1.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0390.71 ▲1.68
Media Library /wp-admin/upload.php3.26 ▲0.0335.17 ▲1.89
Kama Thumbnail /wp-admin/options-general.php?page=kama_thumb3.3031.60

Server storage [IO: ▲0.13MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Kama Thumbnail
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▼0.051.62 ▼0.2443.59 ▼0.62
Dashboard /wp-admin2,202 ▲225.56 ▲0.0382.16 ▼10.7737.44 ▼1.54
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0133.82 ▼8.9534.62 ▼7.34
Add New Post /wp-admin/post-new.php1,538 ▲1218.25 ▼4.84610.80 ▼70.0670.04 ▲15.12
Media Library /wp-admin/upload.php1,398 ▲14.29 ▲0.0995.76 ▼8.5341.99 ▼0.68
Kama Thumbnail /wp-admin/options-general.php?page=kama_thumb1,0291.9922.0832.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/kama-thumbnail/uninstall.php+30
    rmdir(wp-content/cache/thumb): No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/kama-thumbnail/functions.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/kama-thumbnail/classes/CLI_Command.php:8
    • > PHP Fatal error
      Trait 'Kama_Thumbnail\\Make_Thumb__Helpers' not found in wp-content/plugins/kama-thumbnail/classes/Make_Thumb.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === kama-thumbnail === )
Please take inspiration from this readme.txt

kama-thumbnail/kama_thumbnail.php 69% from 13 tests

"Kama Thumbnail" version 3.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("kama-thumbnail.php" instead of "kama_thumbnail.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Description: The description should be shorter than 140 characters (currently 276 characters long)
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

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
Everything looks great! No dangerous files found in this plugin1,896 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity32.73
▷ Minimum class complexity2.00
▷ Maximum class complexity165.00
Average method complexity4.98
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
▷ Static methods1719.10%
▷ Public methods5460.67%
▷ Protected methods2022.47%
▷ Private methods1516.85%
▷ Named functions1260.00%
▷ Anonymous functions840.00%
▷ Global constants4100.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
No PNG files were detected