82% weluka-lite

Code Review | Weluka Lite

WordPress plugin Weluka Lite scored82%from 54 tests.

About plugin

  • Plugin page: weluka-lite
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Feb 23, 2016
  • Latest release: Apr 15, 2016
  • Number of updates: 17
  • Update frequency: every 3.8 days
  • Top authors: weluka.me (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,243 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.59MB] [CPU: ▲8.69ms] Passed 4 tests

An overview of server-side resources used by Weluka Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.99 ▲1.5354.06 ▲12.06
Dashboard /wp-admin4.98 ▲1.6860.98 ▲13.21
Posts /wp-admin/edit.php4.98 ▲1.6367.60 ▲20.27
Add New Post /wp-admin/post-new.php7.41 ▲1.52109.74 ▼1.06
Media Library /wp-admin/upload.php4.98 ▲1.7647.03 ▲10.54
Weluka /wp-admin/admin.php?page=weluka_options4.9845.90
Seo Setting /wp-admin/admin.php?page=weluka_seo4.9856.29

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Weluka Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,146 ▲38515.06 ▲0.7911.87 ▲10.2243.77 ▲2.55
Dashboard /wp-admin2,364 ▲1836.15 ▲0.44108.20 ▼1.8738.98 ▼3.78
Posts /wp-admin/edit.php2,292 ▲1893.43 ▲1.4044.45 ▲4.6829.15 ▼4.50
Add New Post /wp-admin/post-new.php1,549 ▲2323.46 ▲0.04658.66 ▲10.7836.48 ▼20.00
Media Library /wp-admin/upload.php1,420 ▲264.11 ▼0.0778.70 ▼30.7344.81 ▼1.21
Weluka /wp-admin/admin.php?page=weluka_options1,0633.0339.3624.83
Seo Setting /wp-admin/admin.php?page=weluka_seo1,1713.0543.1829.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WelukaBuilder' not found in wp-content/plugins/weluka-lite/includes/builder-snippets.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/weluka-lite/uninstall.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Builder main interface.), #2 (Builder colum setting.), #3 (Option setting.)
  • Donate link: Invalid URI found ("")
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

weluka-lite/weluka.php 85% from 13 tests

This is the main PHP file of "Weluka Lite" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("weluka-lite.php" instead of "weluka.php")
  • 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 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin11,928 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP61,0041,3828,524
JavaScript1245911,293
SVG200943
PO File17391,464861
CSS75122307

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,445)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 135)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity444.75
▷ Minimum class complexity61.00
▷ Maximum class complexity1,445.00
Average method complexity9.74
▷ Minimum method complexity1.00
▷ Maximum method complexity135.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods203
▷ Static methods2512.32%
▷ Public methods19998.03%
▷ Protected methods10.49%
▷ Private methods31.48%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants75
▷ Global constants00.00%
▷ Class constants75100.00%
▷ Public constants75100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png3.19KB1.68KB▼ 47.45%
assets/js/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%
assets/js/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png3.55KB1.62KB▼ 54.44%
assets/js/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png8.61KB5.13KB▼ 40.41%
assets/js/bootstrap-colorpicker/img/bootstrap-colorpicker/hue-horizontal.png2.77KB0.47KB▼ 83.15%