78% mas-addons-for-elementor

Code Review | MAS Elementor

WordPress plugin MAS Elementor scored78%from 54 tests.

About plugin

  • Plugin page: mas-addons-for-el...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 29, 2022
  • Latest release: Nov 24, 2023
  • Number of updates: 39
  • Update frequency: every 9.4 days
  • Top authors: madrasthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼6.58ms] Passed 4 tests

This is a short check of server-side resources used by MAS Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3037.89 ▼3.78
Dashboard /wp-admin3.69 ▲0.3448.49 ▼18.95
Posts /wp-admin/edit.php3.79 ▲0.4350.71 ▲3.88
Add New Post /wp-admin/post-new.php6.54 ▲0.6584.97 ▼4.06
Media Library /wp-admin/upload.php3.63 ▲0.4036.64 ▲0.48
Project Types /wp-admin/edit-tags.php?taxonomy=jetpack-portfolio-type&post_type=jetpack-portfolio3.5937.53
All Projects /wp-admin/edit.php?post_type=jetpack-portfolio3.6434.94
Project Tags /wp-admin/edit-tags.php?taxonomy=jetpack-portfolio-tag&post_type=jetpack-portfolio3.5934.74
Add New /wp-admin/post-new.php?post_type=jetpack-portfolio6.5876.34

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 287 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
mas_meta_box_errors
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for MAS Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9114.71 ▲0.511.53 ▼0.3137.50 ▼6.05
Dashboard /wp-admin2,243 ▲665.60 ▼0.0898.08 ▲4.9246.28 ▲2.67
Posts /wp-admin/edit.php2,145 ▲422.09 ▲0.1240.94 ▲3.1134.83 ▲2.62
Add New Post /wp-admin/post-new.php1,565 ▲3023.61 ▼1.23580.41 ▼15.0148.62 ▼14.40
Media Library /wp-admin/upload.php1,442 ▲424.22 ▲0.02101.08 ▲4.9345.33 ▲0.72
Project Types /wp-admin/edit-tags.php?taxonomy=jetpack-portfolio-type&post_type=jetpack-portfolio1,3192.2431.1936.10
All Projects /wp-admin/edit.php?post_type=jetpack-portfolio1,1811.9436.6234.16
Project Tags /wp-admin/edit-tags.php?taxonomy=jetpack-portfolio-tag&post_type=jetpack-portfolio1,2912.2632.4236.01
Add New /wp-admin/post-new.php?post_type=jetpack-portfolio6,25219.79943.4933.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • mas_meta_box_errors
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-templates.php
    • > /wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-tabs.php
    • > /wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-tabs-item.php
    • > /wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-content.php
    • > /wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-filters-item.php
    • > /wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-preview.php
    • > /wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-filters.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MASElementor\\Modules\\QueryControl\\Classes\\Elementor_Post_Query' not found in wp-content/plugins/mas-addons-for-elementor/modules/query-control/classes/elementor-related-query.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-header-back.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mas-addons-for-elementor/portfolio/includes/functions.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-header.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-loading.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mas-addons-for-elementor/portfolio/modules/classes/class-mas-jetpack-portfolio.php:1032
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-error.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-item.php:22
    • > PHP Warning
      require(MAS_ELEMENTOR_ASSETS_PATHtemplates/images/logo.svg): failed to open stream: No such file or directory in wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-header-logo.php on line 9
    • > PHP Fatal error
      require(): Failed opening required 'MAS_ELEMENTOR_ASSETS_PATHtemplates/images/logo.svg' (include_path='.:/usr/share/php') in wp-content/plugins/mas-addons-for-elementor/templates/scripts/template-modal-header-logo.php on line 9

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (These are the widgets included in this plugin.), #2 (Mas-post elementor-library is where we build the post widget's loop template.), #3 (Build content using dynamic tags here we add featured image for template.), #4 (Build content using dynamic tags here we add title for template.), #5 (Build content using dynamic tags here we add date for template.), #6 (Use Posts widgets to display posts, it is displayed in this style by default.), #7 (Select the dropdown control Mas Template to display different styles you built in mas-posts), #8 (This is the output of the posts widget from the selected template.)
You can take inspiration from this readme.txt

mas-addons-for-elementor/mas-elementor.php 85% from 13 tests

Analyzing the main PHP file in "MAS Elementor" version 1.1.0
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mas-addons-for-elementor.php" instead of "mas-elementor.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 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
Good job! No executable or dangerous file extensions detected60,898 lines of code in 283 files:
LanguageFilesBlank linesComment linesLines of code
PHP2247,32510,35948,318
JavaScript292,1888947,414
CSS301291055,166

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.12
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces82
Interfaces0
Traits8
Classes189
▷ Abstract classes157.94%
▷ Concrete classes17492.06%
▷ Final classes10.57%
Methods1,516
▷ Static methods714.68%
▷ Public methods1,16476.78%
▷ Protected methods24916.42%
▷ Private methods1036.79%
Functions40
▷ Named functions2562.50%
▷ Anonymous functions1537.50%
Constants42
▷ Global constants1023.81%
▷ Class constants3276.19%
▷ Public constants32100.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
No PNG images were found in this plugin