84% jhakkas-elements

Code Review | Jhakkas Elements

WordPress plugin Jhakkas Elements scored 84% from 54 tests.

About plugin

  • Plugin page: jhakkas-elements
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Jan 16, 2021
  • Latest release: Feb 5, 2022
  • Number of updates: 20
  • Update frequency: every 19.3 days
  • Top authors: unikforce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,083 total downloads

Benchmarks

Plugin footprint 83% 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.14MB] [CPU: ▼10.82ms] Passed 4 tests

A check of server-side resources used by Jhakkas Elements
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6117.71 ▼24.97
Dashboard /wp-admin3.32 ▲0.0145.65 ▼4.82
Posts /wp-admin/edit.php3.37 ▲0.0146.73 ▼1.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.46 ▼11.94
Media Library /wp-admin/upload.php3.24 ▲0.0140.00 ▲5.83

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Jhakkas Elements
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,474 ▼26114.77 ▲0.780.60 ▼1.3517.01 ▼25.15
Dashboard /wp-admin2,224 ▲335.88 ▲0.98109.10 ▼2.8440.33 ▼7.36
Posts /wp-admin/edit.php2,106 ▲172.06 ▲0.0340.89 ▲6.2534.90 ▲0.56
Add New Post /wp-admin/post-new.php1,551 ▲3723.08 ▲5.51648.82 ▼21.1072.81 ▲17.72
Media Library /wp-admin/upload.php1,406 ▲214.32 ▲0.0194.87 ▼5.8341.36 ▼8.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Everything seems fine, however 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
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jhakkas-elements/widgets/service2/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jhakkas-elements/widgets/service3/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jhakkas-elements/widgets/feature1/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jhakkas-elements/widgets/team2/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jhakkas-elements/widgets/portfolio1/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jhakkas-elements/widgets/service1/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jhakkas-elements/widgets/team1/view.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: elements, addons, elementor widget, elementor, elementor addon

jhakkas-elements/jhakkas-elements.php 92% from 13 tests

"Jhakkas Elements" version 1.0.0'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:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,370 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP172321402,855
CSS1186493
JavaScript114022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods57
▷ Static methods11.75%
▷ Public methods4070.18%
▷ Protected methods1424.56%
▷ Private methods35.26%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin