72% news-element

Code Review | News Element Elementor Blog Magazine

WordPress plugin News Element Elementor Blog Magazine scored72%from 54 tests.

About plugin

  • Plugin page: news-element
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 26, 2022
  • Latest release: Nov 18, 2023
  • Number of updates: 16
  • Update frequency: every 38.2 days
  • Top authors: webangon (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /2,012 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.51ms] Passed 4 tests

This is a short check of server-side resources used by News Element Elementor Blog Magazine
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.00 ▲0.41
Dashboard /wp-admin3.38 ▲0.0444.46 ▼13.39
Posts /wp-admin/edit.php3.44 ▲0.0844.62 ▼2.80
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.32 ▼6.26
Media Library /wp-admin/upload.php3.31 ▲0.0831.45 ▲0.66
News Element /wp-admin/admin.php?page=news-element3.0821.61
Starter Sites /wp-admin/admin.php?page=newselement_demo3.0822.79

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

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

Browser metrics Passed 4 tests

News Element Elementor Blog Magazine: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.27 ▼0.071.98 ▼0.0437.99 ▼7.98
Dashboard /wp-admin2,192 ▲155.58 ▼0.0286.81 ▼3.9740.76 ▼4.62
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0039.63 ▼0.2335.58 ▼2.86
Add New Post /wp-admin/post-new.php1,526 ▼023.41 ▼0.21711.07 ▲66.3857.49 ▲6.52
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0199.69 ▲1.7842.64 ▲2.44
News Element /wp-admin/admin.php?page=news-element280.410.073.98
Starter Sites /wp-admin/admin.php?page=newselement_demo280.410.093.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • _khbsh
    • news24lib
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 10× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/news-element/widgets/block/video_playlist/style_two.php
    • > /wp-content/plugins/news-element/widgets/block/post-navigation/two.php
    • > /wp-content/plugins/news-element/widgets/block/video_playlist/style_one.php
    • > /wp-content/plugins/news-element/widgets/block/heading/view.php
    • > /wp-content/plugins/news-element/widgets/block/heading-oblique/view.php
    • > /wp-content/plugins/news-element/widgets/block/tax-list-3/view.php
    • > /wp-content/plugins/news-element/widgets/block/post-navigation/three.php
    • > /wp-content/plugins/news-element/widgets/block/post-navigation/four.php
    • > /wp-content/plugins/news-element/widgets/block/post-navigation/one.php
    • > /wp-content/plugins/news-element/widgets/block/post-navigation/five.php
  • 421× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: wp_query in wp-content/plugins/news-element/widgets/block/hero-grid3/style_three.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'News_Element\\Khobish_Helper' not found in wp-content/plugins/news-element/widgets/block/menu-1/leftbar_nav.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/news-element/widgets/block/menu-1/tap_logo_search.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/news-element/widgets/block/video_playlist/view.php on line 15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/news-element/widgets/block/social_2/style_two.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/news-element/widgets/block/slider-4/view.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'News_Element\\Khobish_Helper' not found in wp-content/plugins/news-element/widgets/block/hero-grid24/view.php:3
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/news-element/widgets/block/menu-1/leftlogomenu.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/news-element/includes/loops/magazine-24/style_one.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/news-element/widgets/block/menu-1/tap_logo_search.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=news-element
    • > Network (severe)
    wp-admin/admin.php?page=news-element - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=newselement_demo
    • > Network (severe)
    wp-admin/admin.php?page=newselement_demo - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in news-element/assets to your readme.txt
You can take inspiration from this readme.txt

news-element/index.php 92% from 13 tests

The principal PHP file in "News Element Elementor Blog Magazine" v. 1.0.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("news-element.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected104,007 lines of code in 576 files:
LanguageFilesBlank linesComment linesLines of code
PHP44411,7603,65865,526
CSS551,98064014,310
JavaScript203,39366412,480
PO File203,0373,4146,180
Sass1595434,811
SVG2112695
JSON1205

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.99
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces21
Interfaces0
Traits1
Classes232
▷ Abstract classes125.17%
▷ Concrete classes22094.83%
▷ Final classes20.91%
Methods1,572
▷ Static methods30119.15%
▷ Public methods1,28181.49%
▷ Protected methods22614.38%
▷ Private methods654.13%
Functions49
▷ Named functions4183.67%
▷ Anonymous functions816.33%
Constants48
▷ Global constants918.75%
▷ Class constants3981.25%
▷ Public constants39100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%