83% smart-addons-for-elementor

Code Review | Smart Addons for Elementor

WordPress plugin Smart Addons for Elementor scored 83% from 54 tests.

About plugin

  • Plugin page: smart-addons-for-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-6.0
  • WordPress version: 6.3.1
  • First release: Dec 19, 2019
  • Latest release: Jul 2, 2022
  • Number of updates: 13
  • Update frequency: every 71.5 days
  • Top authors: themebeer (92.31%)stalukder03 (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 899 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.86ms] Passed 4 tests

An overview of server-side resources used by Smart Addons for Elementor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.90 ▼3.63
Dashboard /wp-admin3.42 ▲0.1248.44 ▼0.55
Posts /wp-admin/edit.php3.47 ▲0.1244.91 ▼2.62
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.19 ▼4.65
Media Library /wp-admin/upload.php3.34 ▲0.1235.91 ▲2.51
All Portfolios /wp-admin/edit.php?post_type=smartad_portfolios3.3934.62
Add New /wp-admin/post-new.php?post_type=smartad_portfolios3.4351.10
Portfolio Category /wp-admin/edit-tags.php?taxonomy=smartad_portfolios_cat&post_type=smartad_portfolios3.3433.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smart Addons for Elementor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲25813.95 ▼0.4012.38 ▲10.4874.50 ▲35.84
Dashboard /wp-admin2,254 ▲655.87 ▲0.9296.77 ▼28.8238.02 ▼4.21
Posts /wp-admin/edit.php2,139 ▲502.06 ▲0.0535.65 ▼1.0136.51 ▲3.16
Add New Post /wp-admin/post-new.php1,561 ▲4023.15 ▲0.01641.40 ▼118.5957.86 ▼11.00
Media Library /wp-admin/upload.php1,436 ▲484.23 ▲0.0296.44 ▼12.3342.35 ▼4.61
All Portfolios /wp-admin/edit.php?post_type=smartad_portfolios1,1282.0034.5934.34
Add New /wp-admin/post-new.php?post_type=smartad_portfolios1,8833.7264.7635.88
Portfolio Category /wp-admin/edit-tags.php?taxonomy=smartad_portfolios_cat&post_type=smartad_portfolios1,3132.3129.3631.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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

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
Please take a closer look at the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-count-down/smart-count-down.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-content-block/smart-content-block.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-portfolio/smart-portfolio.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-accordion/smart-accordion.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-heading/smart-heading.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-service/smart-service.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-tab/smart-tab.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-before-after/smart-before-after.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-team/smart-team.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smart-addons-for-elementor/elements/smart-testimonial/smart-testimonial.php:4

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

smart-addons-for-elementor/smart-addons-elementor.php 85% from 13 tests

The main file in "Smart Addons for Elementor" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-addons-for-elementor.php" instead of "smart-addons-elementor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin24,152 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,2788712,303
JavaScript81,5221,4106,027
PHP122881503,125
SVG2002,697

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity6.91
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods79
▷ Static methods11.27%
▷ Public methods5569.62%
▷ Protected methods2329.11%
▷ Private methods11.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
5 PNG files occupy 0.41MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/testimonial-1.png9.51KB3.80KB▼ 60.06%
assets/img/signature-2.png3.13KB2.16KB▼ 30.90%
assets/img/signature.png3.15KB2.16KB▼ 31.29%
assets/img/testimonial-2.png277.94KB98.67KB▼ 64.50%
assets/img/team.png122.30KB46.50KB▼ 61.98%