78% card-elements-for-beaver-builder

Code Review | Card Elements for Beaver Builder

WordPress plugin Card Elements for Beaver Builder scored78%from 54 tests.

About plugin

  • Plugin page: card-elements-for...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2021
  • Latest release: Oct 5, 2023
  • Number of updates: 5
  • Update frequency: every 128.8 days
  • Top authors: techeshta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.70ms] Passed 4 tests

An overview of server-side resources used by Card Elements for Beaver Builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.05 ▲1.14
Dashboard /wp-admin3.33 ▲0.0341.04 ▼5.58
Posts /wp-admin/edit.php3.38 ▲0.0246.98 ▲0.94
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.59 ▼18.02
Media Library /wp-admin/upload.php3.26 ▲0.0231.06 ▼0.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Card Elements for Beaver Builder: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.64 ▼0.1042.65 ▼3.84
Dashboard /wp-admin2,195 ▲185.63 ▲0.0294.28 ▼13.4040.52 ▼3.54
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0136.69 ▲1.3034.45 ▼3.45
Add New Post /wp-admin/post-new.php1,526 ▼223.08 ▼0.00651.82 ▲1.4253.31 ▼11.57
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.0794.56 ▼6.0340.69 ▼7.06

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
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 8× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-2.php
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-3.php
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/testimonial-card/includes/testimonial-card-style-6.php
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-4.php
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-5.php
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-1.php
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/testimonial-card/includes/testimonial-card-style-1.php
    • > /wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-11.php
  • 396× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to get property 'number_of_posts' of non-object in wp-content/plugins/card-elements-for-beaver-builder/modules/post-card/includes/frontend.php on line 6
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/card-elements-for-beaver-builder/modules/testimonial-card/includes/testimonial-card-style-1.php on line 3
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-2.php on line 154
    • > PHP Notice
      Trying to get property 'profile_html_tag' of non-object in wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-11.php on line 13
    • > PHP Notice
      Trying to get property 'profile_icon_spacing' of non-object in wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-5.php on line 163
    • > PHP Notice
      Trying to get property 'post_sort_order' of non-object in wp-content/plugins/card-elements-for-beaver-builder/modules/post-card/includes/frontend.php on line 9
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-2.php on line 140
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-4.php on line 9
    • > PHP Notice
      Trying to get property 'profile_bg_image' of non-object in wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-5.php on line 9
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/card-elements-for-beaver-builder/modules/profile-card/includes/profile-card-style-11.php on line 121

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: beaver builder post card widget, card elements for beaver builder, testimonial module, beaver builder card addon, beaver builder...

card-elements-for-beaver-builder/card-elements-for-beaver-builder.php 92% from 13 tests

Analyzing the main PHP file in "Card Elements for Beaver Builder" version 1.0.3
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)

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 plugin5,409 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP241733324,123
CSS425341,229
SVG40357

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity2.20
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/default.png6.00KB5.03KB▼ 16.19%