84% portfolio-widgets-for-elementor

Code Review | Portfolio Widgets for Elementor

WordPress plugin Portfolio Widgets for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: portfolio-widgets...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Feb 27, 2020
  • Latest release: Feb 27, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: codelessthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /691 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.95ms] Passed 4 tests

Analyzing server-side resources used by Portfolio Widgets for Elementor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.42 ▲1.95
Dashboard /wp-admin3.32 ▼0.0250.59 ▼8.91
Posts /wp-admin/edit.php3.37 ▲0.0249.05 ▼1.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.30 ▼7.34
Media Library /wp-admin/upload.php3.24 ▲0.0241.60 ▲3.87

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Portfolio Widgets for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲4613.58 ▼0.791.93 ▼0.0944.60 ▲2.00
Dashboard /wp-admin2,241 ▲354.82 ▼0.05101.98 ▼5.5036.26 ▼1.21
Posts /wp-admin/edit.php2,117 ▲142.02 ▲0.0338.77 ▲1.0137.32 ▲3.04
Add New Post /wp-admin/post-new.php1,561 ▲3021.14 ▼1.99673.34 ▲42.8060.88 ▲5.21
Media Library /wp-admin/upload.php1,417 ▲174.26 ▲0.05114.27 ▲6.7747.96 ▲1.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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 take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/portfolio-widgets-for-elementor/widgets/partials/style-only_image.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/portfolio-widgets-for-elementor/widgets/partials/style-with_title_bottom.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ElementorPortfolio\\add_action() in wp-content/plugins/portfolio-widgets-for-elementor/plugin.php:182

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
5 plugin tags: page builder, grid, elementor, carousel, portfolio

portfolio-widgets-for-elementor/elementor-portfolio.php 85% from 13 tests

Analyzing the main PHP file in "Portfolio Widgets for Elementor" version 1.0.0
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("portfolio-widgets-for-elementor.php" instead of "elementor-portfolio.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected6,682 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON2003,974
JavaScript35458592,219
PHP7128240379
Sass1160109
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.67
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods24
▷ Static methods14.17%
▷ Public methods1979.17%
▷ Protected methods416.67%
▷ Private methods14.17%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin