10% embe-core

Code Review | EmBe Core

WordPress plugin EmBe Core scored10%from 54 tests.

About plugin

  • Plugin page: embe-core
  • Plugin version: 2.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.3
  • WordPress version: 6.3.1
  • First release: Dec 23, 2019
  • Latest release: Sep 24, 2020
  • Number of updates: 21
  • Update frequency: every 13.2 days
  • Top authors: alithemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,310 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/embe-core/inc/redux/inc/class.redux_filesystem.php+28
    Creating default object from empty value

Server metrics [RAM: ▼0.49MB] [CPU: ▼47.93ms] Passed 4 tests

An overview of server-side resources used by EmBe Core
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0416.69 ▼26.42
Dashboard /wp-admin3.52 ▲0.2116.82 ▼40.45
Posts /wp-admin/edit.php3.52 ▲0.1614.97 ▼37.00
Add New Post /wp-admin/post-new.php3.52 ▼2.3715.29 ▼87.83
Media Library /wp-admin/upload.php3.52 ▲0.2920.53 ▼17.70
General setting /wp-admin/admin.php?page=alith_option_options&tab=13.5215.81
Home featured posts /wp-admin/admin.php?page=alith_option_options&tab=73.5216.62
Import / Export /wp-admin/admin.php?page=alith_option_options&tab=203.5216.59
Navigation /wp-admin/admin.php?page=alith_option_options&tab=63.5219.32
Social network /wp-admin/admin.php?page=alith_option_options&tab=173.5217.11
Off canvas /wp-admin/admin.php?page=alith_option_options&tab=163.5215.63
Demo Importer /wp-admin/admin.php?page=alith_option_options&tab=183.5216.52
Footer & Bottom /wp-admin/admin.php?page=alith_option_options&tab=83.5219.88
Header & Logo /wp-admin/admin.php?page=alith_option_options&tab=53.5217.48
Layouts settting /wp-admin/admin.php?page=alith_option_options&tab=113.5216.65

Server storage [IO: ▲4.63MB] [DB: ▲0.08MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 588 new files
Database: no new tables, 20 new options
New WordPress options
can_compress_scripts
widget_alitheme_postcarausel
db_upgraded
widget_theysaidso_widget
alith_option-transients
widget_alitheme_last_post
widget_recent-posts
widget_null-instagram-feed
widget_alitheme_twitter
widget_alitheme_lastpost
...

Browser metrics Passed 4 tests

Checking browser requirements for EmBe Core
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲22214.17 ▼0.382.01 ▲0.0282.27 ▲37.92
Dashboard /wp-admin2,375 ▲2015.70 ▲0.1692.07 ▼11.5440.83 ▼3.89
Posts /wp-admin/edit.php2,228 ▲1282.05 ▲0.0234.86 ▼1.0835.99 ▼2.24
Add New Post /wp-admin/post-new.php1,623 ▲9522.99 ▼0.02619.33 ▼97.8659.44 ▲4.64
Media Library /wp-admin/upload.php1,518 ▲1184.23 ▼0.18104.10 ▼1.5748.04 ▲1.44
General setting /wp-admin/admin.php?page=alith_option_options&tab=111,6389.77265.13152.04
Home featured posts /wp-admin/admin.php?page=alith_option_options&tab=711,5989.44246.85260.67
Import / Export /wp-admin/admin.php?page=alith_option_options&tab=2011,5989.43221.57228.01
Navigation /wp-admin/admin.php?page=alith_option_options&tab=613,74412.41386.25286.66
Social network /wp-admin/admin.php?page=alith_option_options&tab=1711,6289.43214.13232.49
Off canvas /wp-admin/admin.php?page=alith_option_options&tab=1612,35011.53299.08218.30
Demo Importer /wp-admin/admin.php?page=alith_option_options&tab=1811,5989.47218.36219.50
Footer & Bottom /wp-admin/admin.php?page=alith_option_options&tab=812,7289.83314.80155.30
Header & Logo /wp-admin/admin.php?page=alith_option_options&tab=512,87110.49335.58266.19
Layouts settting /wp-admin/admin.php?page=alith_option_options&tab=1111,6029.54227.70227.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/embe-core/inc/redux/inc/class.redux_filesystem.php+28
    Creating default object from empty value
  • This plugin does not fully uninstall, leaving 19 options in the database
    • widget_alitheme_post_modules
    • widget_alitheme_comment
    • widget_null-instagram-feed
    • alith_option-transients
    • can_compress_scripts
    • widget_alitheme_last_post
    • widget_alitheme_adv
    • widget_recent-posts
    • widget_alithemes-theme-widget-tags
    • widget_recent-comments
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=11
    • > Warning in wp-content/plugins/embe-core/inc/redux/inc/class.redux_filesystem.php+28
    Creating default object from empty value
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=11
    • > Error in wp-includes/Requests/src/Exception/InvalidArgument.php+29
    Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in wp-includes/Requests/src/Exception/InvalidArgument.php:29
    Stack trace:
    #0 wp-includes/Requests/src/Cookie.php(84): WpOrg\Requests\Exception\InvalidArgument::create()
    #1 wp-includes/class-wp-http.php(472): WpOrg\Requests\Cookie->__construct()
    #2 wp-includes/class-wp-http.php(352): WP_Http::normalize_cookies()
    #3 wp-includes/http.php(150): WP_Http->request()
    #4 wp-content/plugins/embe-core/inc/redux/inc/class.p.php(230): wp_remote_request()
    #5 wp-includes/class-wp-hook.php(310): Redux_P->proxy()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 wp-admin/admin-ajax.php(188): do_action()
    #9 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/embe-core/widgets/categories_tabs/layout_2.php
    • > /wp-content/plugins/embe-core/widgets/categories_tabs/layout_1.php
  • 264× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'post' of non-object in wp-content/plugins/embe-core/widgets/posts-carausel/last_posts_carausel_creative.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/embe-core/widgets/last-posts/last_posts_style_3.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/embe-core/widgets/post-modules/post_modules_layout_5.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/embe-core/inc/redux/templates/panel/container.tpl.php:12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/embe-core/widgets/last-posts/last_posts_style_2.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/embe-core/widgets/posts-aside/posts_aside_layout_5.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/embe-core/widgets/about/about.php:1
    • > PHP Notice
      Trying to get property 'post' of non-object in wp-content/plugins/embe-core/widgets/posts-aside/posts_aside_layout_1.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/embe-core/widgets/posts-carausel/last_posts_carausel_single.php:5
    • > PHP Notice
      Undefined variable: wpQuery in wp-content/plugins/embe-core/widgets/post-modules/post_modules_layout_7.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=11
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=11
    • > Network (severe)
    wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=1
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=1 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=7
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=7 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=20
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=20 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=6
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=6 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=17
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=17 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=16
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=16 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=18
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=18 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=8
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=8 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=5
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=5 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=alith_option_options&tab=11
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=alith_option_options&tab=11 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=c542cd4ece&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3Dc542cd4ece%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: redux framework, alithemes, magazine theme, embe theme

embe-core/embe-core.php 92% from 13 tests

Analyzing the main PHP file in "EmBe Core" version 2.2.1
Please make the necessary changes and fix the following:
  • 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 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected49,086 lines of code in 383 files:
LanguageFilesBlank linesComment linesLines of code
PHP1844,8476,30126,453
JavaScript902,6611,95912,234
Sass541,182607,571
SVG3121,165
JSON11840909
CSS502851701
LESS10053

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity30.71
▷ Minimum class complexity1.00
▷ Maximum class complexity880.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes134
▷ Abstract classes00.00%
▷ Concrete classes134100.00%
▷ Final classes00.00%
Methods766
▷ Static methods11114.49%
▷ Public methods61980.81%
▷ Protected methods9111.88%
▷ Private methods567.31%
Functions62
▷ Named functions6198.39%
▷ Anonymous functions11.61%
Constants61
▷ Global constants46.56%
▷ Class constants5793.44%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
111 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/sidebar_right.png3.14KB0.26KB▼ 91.72%
assets/imgs/layout-zigzag.png2.98KB0.16KB▼ 94.76%
assets/imgs/featured_grid_2.png3.03KB0.19KB▼ 93.80%
inc/redux/inc/fields/spinner/arrow_right.png0.15KB0.12KB▼ 18.18%
inc/redux/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%