77% visualmodo-elements

Code Review | Visualmodo Elements

WordPress plugin Visualmodo Elements scored77%from 54 tests.

About plugin

  • Plugin page: visualmodo-elements
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: May 1, 2020
  • Latest release: Mar 8, 2021
  • Number of updates: 5
  • Update frequency: every 62.2 days
  • Top authors: visualmodo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /14,176 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.12ms] Passed 4 tests

Analyzing server-side resources used by Visualmodo Elements
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.22 ▼2.22
Dashboard /wp-admin3.36 ▲0.0547.37 ▼8.71
Posts /wp-admin/edit.php3.48 ▲0.1155.75 ▲7.73
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.96 ▼17.60
Media Library /wp-admin/upload.php3.29 ▲0.0537.27 ▲0.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 486 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Visualmodo Elements
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲5914.36 ▲0.0111.00 ▲8.9736.93 ▼8.38
Dashboard /wp-admin2,230 ▲535.57 ▼0.0599.80 ▼5.6384.54 ▲39.16
Posts /wp-admin/edit.php2,156 ▲561.99 ▲0.0140.41 ▲3.8440.57 ▲4.39
Add New Post /wp-admin/post-new.php1,570 ▲4223.49 ▲0.45755.15 ▲76.3562.25 ▲7.46
Media Library /wp-admin/upload.php1,450 ▲504.17 ▼0.04107.78 ▼3.5375.10 ▲27.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/counter.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/testimonial.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/progress-bar.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/alert.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/icon.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/svg.php
    • > /wp-content/plugins/visualmodo-elements/visualmodo-elements.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/circular-progress-bar.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/pricing.php
    • > /wp-content/plugins/visualmodo-elements/includes/elements/elements/icon-group.php
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Panel' not found in wp-content/plugins/visualmodo-elements/includes/options/core/inc/extensions/customizer/inc/customizer_panel.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visualmodo-elements/includes/options/core/templates/panel/header.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/visualmodo-elements/includes/options/core/templates/panel/menu_container.tpl.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/visualmodo-elements/includes/options/core/inc/welcome/views/support.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/visualmodo-elements/includes/options/core/templates/panel/container.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visualmodo-elements/includes/options/core/inc/welcome/views/about.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/visualmodo-elements/includes/elements/lean-map.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/visualmodo-elements/includes/options/core/inc/extensions/customizer/inc/customizer_control.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/visualmodo-elements/includes/options/core/inc/themecheck/checks/full_package.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/visualmodo-elements/includes/options/core/templates/panel/footer.tpl.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Screenshots: These screenshots need descriptions #1, #2 in visualmodo-elements/assets to your readme.txt
The official readme.txt might help

visualmodo-elements/visualmodo-elements.php 92% from 13 tests

Analyzing the main PHP file in "Visualmodo Elements" version 1.0.2
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin50,316 lines of code in 347 files:
LanguageFilesBlank linesComment linesLines of code
PHP1254,4515,72420,676
JavaScript942,6742,11612,316
Sass701,231668,278
CSS541,2621357,137
SVG201947
JSON11840909
LESS10053

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity29.45
▷ Minimum class complexity1.00
▷ Maximum class complexity883.00
Average method complexity6.60
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes121
▷ Abstract classes00.00%
▷ Concrete classes121100.00%
▷ Final classes00.00%
Methods616
▷ Static methods10416.88%
▷ Public methods45974.51%
▷ Protected methods10717.37%
▷ Private methods508.12%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants58
▷ Global constants11.72%
▷ Class constants5798.28%
▷ Public constants57100.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
46 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/options/core/assets/img/3-col-portfolio.png1.00KB0.15KB▼ 85.27%
includes/elements/images/circular-progress-bar.png0.49KB0.25KB▼ 49.60%
includes/options/core/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
includes/options/core/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_f6cf3b_256x240.png8.68KB4.11KB▼ 52.68%
includes/options/core/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%