68% sales-page-addon

Code Review | Sales Page Addon - Elementor & Beaver Builder

WordPress plugin Sales Page Addon - Elementor & Beaver Builder scored68%from 54 tests.

About plugin

  • Plugin page: sales-page-addon
  • Plugin version: 1.4.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 16, 2021
  • Latest release: Sep 28, 2023
  • Number of updates: 9
  • Update frequency: every 92.8 days
  • Top authors: nicheaddons (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,331 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.38MB] [CPU: ▲19.46ms] 75% from 4 tests

An overview of server-side resources used by Sales Page Addon - Elementor & Beaver Builder
Please take the time to fix the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.38MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.19 ▲5.7369.72 ▲24.88
Dashboard /wp-admin9.21 ▲5.8774.19 ▲8.54
Posts /wp-admin/edit.php9.22 ▲5.8591.44 ▲41.75
Add New Post /wp-admin/post-new.php9.95 ▲4.06110.59 ▲8.64
Media Library /wp-admin/upload.php9.22 ▲5.9869.34 ▲35.79
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2267.06

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 323 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
sales_page_flush_rewrite_rules_flag
widget_recent-posts
db_upgraded
sales-page-builders
widget_theysaidso_widget
fs_active_plugins
widget_recent-comments
fs_accounts
fs_debug_mode
...

Browser metrics Passed 4 tests

Sales Page Addon - Elementor & Beaver Builder: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15514.39 ▲0.272.04 ▼0.0935.38 ▼8.81
Dashboard /wp-admin2,269 ▲925.88 ▲0.2396.54 ▲1.1244.28 ▲1.32
Posts /wp-admin/edit.php2,180 ▲802.44 ▲0.4441.44 ▲5.8039.31 ▲4.15
Add New Post /wp-admin/post-new.php1,578 ▲3623.49 ▲0.47626.90 ▼69.4134.64 ▼18.62
Media Library /wp-admin/upload.php1,474 ▲834.46 ▲0.25103.75 ▲0.2345.79 ▼3.28
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1232.0736.6231.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/sales-page-addon/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 11 options
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • sales_page_flush_rewrite_rules_flag
    • fs_active_plugins
    • widget_recent-comments
    • db_upgraded
    • fs_accounts
    • ...

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
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sales-page-addon/beaver/modules/niche-icon-group/includes/frontend.php
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/sales-page-addon/elementor/widgets/basic/salespage-text-editor.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderCSS' not found in wp-content/plugins/sales-page-addon/beaver/modules/niche-magic-wind/includes/frontend.css.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/sales-page-addon/beaver/modules/niche-contact/niche-contact.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sales-page-addon/beaver/modules/niche-testimonial/includes/frontend.php:35
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sales-page-addon/beaver/modules/niche-icon-group/includes/frontend.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sales-page-addon/beaver/modules/niche-icon-box/includes/frontend.php:38
    • > PHP Notice
      Trying to get property 'icons' of non-object in wp-content/plugins/sales-page-addon/beaver/modules/niche-icon-group/includes/frontend.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/sales-page-addon/beaver/modules/niche-icon-box/niche-icon-box.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/sales-page-addon/beaver/modules/niche-icon-group/niche-icon-group.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/sales-page-addon/beaver/modules/niche-magic-wind/niche-magic-wind.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: page, funnel, template, elementor, builder...

sales-page-addon/sales-page-addon.php 92% from 13 tests

The main PHP script in "Sales Page Addon - Elementor & Beaver Builder" version 1.4.2 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 360 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin71,875 lines of code in 229 files:
LanguageFilesBlank linesComment linesLines of code
PHP1648,51817,77038,857
JSON230023,144
CSS30149786,830
JavaScript8216901,785
SVG4101,259

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity70.64
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes00.00%
Methods1,317
▷ Static methods20815.79%
▷ Public methods91769.63%
▷ Protected methods272.05%
▷ Private methods37328.32%
Functions161
▷ Named functions15998.76%
▷ Anonymous functions21.24%
Constants156
▷ Global constants10768.59%
▷ Class constants4931.41%
▷ Public constants49100.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
17 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/video-icon.png2.21KB0.92KB▼ 58.35%
assets/images/button-arrow-top-black.png1.36KB0.63KB▼ 53.47%
freemius/assets/img/plugin-icon.png16.02KB7.81KB▼ 51.24%
admin/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/images/title-buzz-left.png2.72KB1.92KB▼ 29.30%