84% ele-conditions

Code Review | Elementor Element Condition

WordPress plugin Elementor Element Condition scored84%from 54 tests.

About plugin

  • Plugin page: ele-conditions
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: May 12, 2018
  • Latest release: Nov 22, 2018
  • Number of updates: 11
  • Update frequency: every 17.6 days
  • Top authors: dudaster (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

5,000+ active /32,481 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.01ms] Passed 4 tests

Analyzing server-side resources used by Elementor Element Condition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.0644.13 ▼2.93
Dashboard /wp-admin3.61 ▲0.0550.49 ▼6.20
Posts /wp-admin/edit.php3.73 ▲0.0549.55 ▼3.10
Add New Post /wp-admin/post-new.php6.19 ▲0.05101.00 ▼15.82
Media Library /wp-admin/upload.php3.54 ▲0.0542.27 ▲4.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Elementor Element Condition
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.021.92 ▲0.2444.51 ▲4.06
Dashboard /wp-admin2,195 ▲185.55 ▼0.1784.88 ▼7.0940.25 ▲0.63
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0535.24 ▼6.9533.99 ▼1.03
Add New Post /wp-admin/post-new.php1,554 ▼018.42 ▲0.10670.70 ▲62.0055.16 ▲2.92
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.09110.13 ▲3.9544.98 ▼1.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ELECONDITIONS_DIRinc/parse_conditions.php): failed to open stream: No such file or directory in wp-content/plugins/ele-conditions/inc/controls.php on line 3
    • > PHP Warning
      Use of undefined constant ELECONDITIONS_DIR - assumed 'ELECONDITIONS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ele-conditions/inc/controls.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ELECONDITIONS_DIRinc/parse_conditions.php' (include_path='.:/usr/share/php') in wp-content/plugins/ele-conditions/inc/controls.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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: conditional, elementor, page-builder, conditional elements, condition

ele-conditions/ele-conditions.php 85% from 13 tests

"Elementor Element Condition" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin227 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34128227

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin