67% pt-elementor-addons-lite

Code Review | PT Addons for Elementor Lite

WordPress plugin PT Addons for Elementor Lite scored 67% from 54 tests.

About plugin

  • Plugin page: pt-elementor-addo...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 5.9.2
  • First release: Aug 3, 2017
  • Latest release: Aug 19, 2021
  • Number of updates: 36
  • Update frequency: every 41.0 days
  • Top authors: paramthemes (97.22%)v2websolutions (5.56%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 69,992 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.52MB] [CPU: ▼336.68ms] Passed 4 tests

This is a short check of server-side resources used by PT Addons for Elementor Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6610.12 ▼41.85
Dashboard /wp-admin2.87 ▼0.548.72 ▼24.64
Posts /wp-admin/edit.php2.87 ▼0.778.30 ▼31.93
Add New Post /wp-admin/post-new.php2.87 ▼4.108.77 ▼1,248.30
Media Library /wp-admin/upload.php2.87 ▼0.427.72 ▼18.49

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 468 new files
Database: no new tables, 3 new options
New WordPress options
pt_plugins_data
pt_save_settings
pt_version

Browser metrics Passed 4 tests

PT Addons for Elementor Lite: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,881 ▲13317.47 ▲1.6815.68 ▲9.283.08 ▲0.80
Dashboard /wp-admin2,954 ▲937.26 ▲1.08125.46 ▼13.17181.79 ▲19.53
Posts /wp-admin/edit.php2,762 ▲683.49 ▲0.2668.40 ▲3.03141.96 ▲0.32
Add New Post /wp-admin/post-new.php1,772 ▲6121.98 ▲0.97432.56 ▼7.11162.34 ▲0.10
Media Library /wp-admin/upload.php1,773 ▲756.22 ▲0.69128.44 ▼14.20209.86 ▲27.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the enqueue_scripts handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 3 options
    • pt_version
    • pt_save_settings
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/pt-elementor-addons-lite/elements/templates/list.php
    • > /wp-content/plugins/pt-elementor-addons-lite/elements/templates/masonry.php
    • > /wp-content/plugins/pt-elementor-addons-lite/admin/pt-plugin-sidebar.php
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pt-elementor-addons-lite/admin/pt-plugin-footer.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/pt-elementor-addons-lite/admin/pt-plugin-header.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/pt-elementor-addons-lite/templates/admin/map.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pt-elementor-addons-lite/templates/admin/general.php:19
    • > PHP Warning
      Use of undefined constant PT_PLUGIN_URL - assumed 'PT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pt-elementor-addons-lite/templates/admin/go-pro.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pt-elementor-addons-lite/includes/triat/functions.php on line 8
    • > PHP Warning
      require(ABSPATHWPINC/option.php): failed to open stream: No such file or directory in wp-content/plugins/pt-elementor-addons-lite/includes/triat/functions.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pt-elementor-addons-lite/templates/admin/go-pro.php:10
    • > PHP Warning
      Use of undefined constant PT_PLUGIN_URL - assumed 'PT_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pt-elementor-addons-lite/templates/admin/tools.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/pt-elementor-addons-lite/admin/pt-plugin-header.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

pt-elementor-addons-lite/pt-elementor-addons.php 77% from 13 tests

The principal PHP file in "PT Addons for Elementor Lite" v. 2.0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pt-elementor-addons-lite.php" instead of "pt-elementor-addons.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)
  • 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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected170,656 lines of code in 391 files:
LanguageFilesBlank linesComment linesLines of code
PHP1549,1039,26982,564
CSS1274,2991,96253,432
JavaScript778,3425,34034,051
SVG33212609

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity19.72
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces66
Interfaces0
Traits8
Classes130
▷ Abstract classes00.00%
▷ Concrete classes130100.00%
▷ Final classes10.77%
Methods1,188
▷ Static methods332.78%
▷ Public methods82269.19%
▷ Protected methods31026.09%
▷ Private methods564.71%
Functions241
▷ Named functions23195.85%
▷ Anonymous functions104.15%
Constants11
▷ Global constants1090.91%
▷ Class constants19.09%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/gift-icon.png6.15KB2.36KB▼ 61.62%
admin/images/logo-shape16.png0.72KB0.81KB0.00%
(invalid) assets/admin/images/pt-featured.png24.60KB0.00KB▼ 100.00%
assets/front-end/img/play-icon.png3.75KB3.92KB0.00%
assets/admin/images/pt-logo.png8.17KB2.56KB▼ 68.63%