93% extended-buttons-for-elementor

Code Review | Extended Buttons for Elementor

WordPress plugin Extended Buttons for Elementor scored 93% from 54 tests.

About plugin

  • Plugin page: extended-buttons-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.1
  • WordPress version: 5.9.2
  • First release: Feb 12, 2018
  • Latest release: Mar 5, 2019
  • Number of updates: 18
  • Update frequency: every 24.9 days
  • Top authors: internetcss (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 6,718 total downloads

Benchmarks

Plugin footprint Passed 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.34MB] [CPU: ▼299.37ms] Passed 4 tests

An overview of server-side resources used by Extended Buttons for Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0355.30 ▲7.02
Dashboard /wp-admin3.28 ▼0.1323.54 ▼8.68
Posts /wp-admin/edit.php3.34 ▼0.3027.06 ▼11.49
Add New Post /wp-admin/post-new.php6.08 ▼0.9178.78 ▼1,174.83
Media Library /wp-admin/upload.php3.29 ▼0.0120.74 ▼2.48

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Extended Buttons for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4015.84 ▲0.217.05 ▲0.612.99 ▲0.74
Dashboard /wp-admin2,895 ▲376.12 ▼0.09117.04 ▼24.81154.36 ▼21.10
Posts /wp-admin/edit.php2,691 ▼33.24 ▲0.0163.53 ▼1.14136.41 ▼10.36
Add New Post /wp-admin/post-new.php1,661 ▼9116.19 ▼5.51415.52 ▼37.39157.57 ▲0.58
Media Library /wp-admin/upload.php1,701 ▲35.54 ▲0.01143.26 ▲5.38185.97 ▼3.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\add_action() in wp-content/plugins/extended-buttons-for-elementor/elementor-helper.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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: The official readme.txt is a good inspiration

extended-buttons-for-elementor/elementor-button-extended.php 77% from 13 tests

Analyzing the main PHP file in "Extended Buttons for Elementor" version 1.0.2
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("extended-buttons-for-elementor.php" instead of "elementor-button-extended.php")
  • Description: The description should be shorter than 140 characters (currently 265 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,672 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP41521051,044
CSS33617615
JavaScript11113

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods758.33%
▷ Protected methods541.67%
▷ Private methods00.00%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/eb-button-icon.png1.36KB0.70KB▼ 48.35%