78% saoshyant-element

Code Review | Saoshyant Element

WordPress plugin Saoshyant Element scored78%from 54 tests.

About plugin

  • Plugin page: saoshyant-element
  • Plugin version: 1.2
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2022
  • Latest release: Feb 21, 2023
  • Number of updates: 28
  • Update frequency: every 14.2 days
  • Top authors: saoshyant1994 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /176 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.44MB] [CPU: ▲24.22ms] Passed 4 tests

A check of server-side resources used by Saoshyant Element
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5140.24 ▼0.04
Dashboard /wp-admin5.07 ▲1.7676.16 ▲25.19
Posts /wp-admin/edit.php5.12 ▲1.7684.31 ▲35.84
Add New Post /wp-admin/post-new.php7.63 ▲1.74131.22 ▲35.88
Media Library /wp-admin/upload.php4.99 ▲1.7672.27 ▲40.78

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 406 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Saoshyant Element
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲16413.70 ▼0.685.29 ▲3.6438.64 ▼3.70
Dashboard /wp-admin2,219 ▲314.90 ▼0.01109.33 ▲6.2840.31 ▼1.21
Posts /wp-admin/edit.php2,102 ▲132.06 ▲0.0640.98 ▼0.3236.05 ▲0.49
Add New Post /wp-admin/post-new.php1,533 ▲1318.53 ▼4.90624.98 ▲5.5055.05 ▲4.25
Media Library /wp-admin/upload.php1,398 ▲104.23 ▲0.0596.65 ▼5.5640.84 ▼3.53

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/saoshyant-element/assets/css/phpfonts/flaticonarrow.php
  • 104× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include_once(SORSORAK_PATHadmin/includes/options-functions.php): failed to open stream: No such file or directory in wp-content/plugins/saoshyant-element/admin/index.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saoshyant-element/admin/includes/perview-global.php:75
    • > PHP Warning
      Use of undefined constant SORSORAK_PATH - assumed 'SORSORAK_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/saoshyant-element/admin/index.php on line 26
    • > PHP Warning
      Use of undefined constant SORSORAK_PATH - assumed 'SORSORAK_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/saoshyant-element/admin/index.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saoshyant-element/inc/widget-sorsorak.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/saoshyant-element/admin/setting-options.php:4
    • > PHP Warning
      Use of undefined constant SAOSORAK_DIR - assumed 'SAOSORAK_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/saoshyant-element/assets/css/phpfonts/flaticonarrow.php on line 2
    • > PHP Warning
      include_once(SORSORAK_PATHadmin/slide-options.php): failed to open stream: No such file or directory in wp-content/plugins/saoshyant-element/admin/index.php on line 3
    • > PHP Warning
      include_once(SORSORAK_PATHadmin/includes/layer.php): failed to open stream: No such file or directory in wp-content/plugins/saoshyant-element/admin/index.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/saoshyant-element/layer/mini/position_size.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
7 plugin tags: portfolio, post layout, staff member, custom post type, widget element...

saoshyant-element/saoshyant-element.php Passed 13 tests

The entry point to "Saoshyant Element" version 1.2 is a PHP file that has certain tags in its header comment area
107 characters long description:
این افزونه شامل انواع المنتها از جمله سرسرک اسلایدر میباشد

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin19,914 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP572,42874510,692
CSS297881774,935
JavaScript141,4679744,251
SVG10020
JSON160016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity7.33
▷ Minimum class complexity6.00
▷ Maximum class complexity8.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1076.92%
▷ Protected methods323.08%
▷ Private methods00.00%
Functions155
▷ Named functions155100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
63 PNG files occupy 1.16MB with 1.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/image/demo.png15.95KB1.13KB▼ 92.90%
admin/assets/image/template_add.png17.16KB1.90KB▼ 88.94%
admin/assets/image/layer_bottom.png15.28KB0.12KB▼ 99.25%
admin/assets/image/panel_cancel.png34.18KB8.75KB▼ 74.39%
admin/assets/image/template_cancel.png34.18KB8.75KB▼ 74.39%