78% themehunk-customizer

Code Review | ThemeHunk Customizer

WordPress plugin ThemeHunk Customizer scored 78% from 54 tests.

About plugin

  • Plugin page: themehunk-customizer
  • Plugin version: 2.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Nov 15, 2022
  • Number of updates: 138
  • Update frequency: every 14.8 days
  • Top authors: themehunk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10,000+ active / 682,277 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.78ms] Passed 4 tests

A check of server-side resources used by ThemeHunk Customizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.03 ▼4.25
Dashboard /wp-admin3.31 ▲0.0152.21 ▼0.05
Posts /wp-admin/edit.php3.43 ▲0.0754.97 ▲5.44
Add New Post /wp-admin/post-new.php5.89 ▲0.01118.46 ▼3.73
Media Library /wp-admin/upload.php3.24 ▲0.0146.69 ▲4.92

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 245 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

ThemeHunk Customizer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲11114.54 ▲0.032.12 ▲0.21129.10 ▼74.08
Dashboard /wp-admin2,254 ▲504.87 ▼0.09206.27 ▲14.75174.28 ▼21.88
Posts /wp-admin/edit.php2,145 ▲562.08 ▼0.00108.95 ▲18.60278.66 ▲74.41
Add New Post /wp-admin/post-new.php1,559 ▲11820.48 ▼1.82906.86 ▲9.26216.86 ▼119.00
Media Library /wp-admin/upload.php1,436 ▲574.16 ▼0.02247.95 ▲37.39284.77 ▲185.73

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/themehunk-customizer/notify/notify-html.php
  • 165× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/themehunk-customizer/amaz-store/customizer/section/frontpage/product-list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themehunk-customizer/big-store/big-store-admin/woo/woo-ajax.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory_uri() in wp-content/plugins/themehunk-customizer/featuredlite/inc/constant.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/themehunk-customizer/amaz-store/customizer/section/frontpage/category-slider.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/themehunk-customizer/amaz-store/amaz-store-front-page/front-ribbon.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/themehunk-customizer/featuredlite/include.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/themehunk-customizer/big-store/customizer/section/frontpage/category-tab.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/themehunk-customizer/big-store/customizer/section/frontpage/banner.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themehunk-customizer/shopline/inc/testimonial.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_parent_theme_file_uri() in wp-content/plugins/themehunk-customizer/shopline/inc/constant.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: oneline-lite, themehunk, customizer, team, service...

themehunk-customizer/themehunk-customizer.php 92% from 13 tests

The main PHP script in "ThemeHunk Customizer" version 2.7.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin45,330 lines of code in 209 files:
LanguageFilesBlank linesComment linesLines of code
PHP1712,6792,31231,347
JavaScript222,3851,83410,532
CSS15203623,397
Markdown118054

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity12.48
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes00.00%
▷ Concrete classes46100.00%
▷ Final classes12.17%
Methods143
▷ Static methods21.40%
▷ Public methods13695.10%
▷ Protected methods53.50%
▷ Private methods21.40%
Functions228
▷ Named functions22799.56%
▷ Anonymous functions10.44%
Constants31
▷ Global constants31100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
25 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
elanzalite/images/style5.png1.53KB0.31KB▼ 79.66%
themehunk/customizer-radio-image/img/gradientovly-4.png7.75KB7.15KB▼ 7.85%
elanzalite/images/style3.png1.53KB0.29KB▼ 81.12%
themehunk/customizer-radio-image/img/gradientovly-1.png7.27KB6.73KB▼ 7.35%
shopline/customizer/images/th-logo.png1.62KB1.07KB▼ 34.04%