83% shortcodes-for-amp-web-stories-and-elementor-widget

Code Review | Web Stories Widgets For Elementor

WordPress plugin Web Stories Widgets For Elementor scored83%from 54 tests.

About plugin

  • Plugin page: shortcodes-for-am...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2020
  • Latest release: Oct 31, 2022
  • Number of updates: 7
  • Update frequency: every 106.7 days
  • Top authors: coolplugins (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /5,938 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.40ms] Passed 4 tests

An overview of server-side resources used by Web Stories Widgets For Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.83 ▼1.66
Dashboard /wp-admin3.35 ▲0.0045.72 ▼13.28
Posts /wp-admin/edit.php3.40 ▲0.0448.16 ▲3.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.05 ▼13.57
Media Library /wp-admin/upload.php3.27 ▲0.0432.50 ▼1.09

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
wsae-installDate
db_upgraded
WSAE-v
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
WSAE-type

Browser metrics Passed 4 tests

Web Stories Widgets For Elementor: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲4813.24 ▼1.021.68 ▼0.2642.75 ▲0.03
Dashboard /wp-admin2,225 ▲345.90 ▲0.82108.25 ▼9.5238.83 ▼6.22
Posts /wp-admin/edit.php2,111 ▲222.04 ▲0.0139.83 ▲0.8936.77 ▲0.99
Add New Post /wp-admin/post-new.php1,547 ▲1423.09 ▼0.35664.51 ▲53.8553.85 ▲1.51
Media Library /wp-admin/upload.php1,407 ▲164.20 ▲0.0293.63 ▼5.0142.11 ▼2.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • WSAE-v
    • db_upgraded
    • widget_theysaidso_widget
    • WSAE-type
    • theysaidso_admin_options
    • wsae-installDate
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/shortcodes-for-amp-web-stories-and-elementor-widget/includes/wsae-recent-story.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/shortcodes-for-amp-web-stories-and-elementor-widget/includes/wsae-recent-story.php on line 10
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/shortcodes-for-amp-web-stories-and-elementor-widget/includes/wsae-recent-story.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/shortcodes-for-amp-web-stories-and-elementor-widget/includes/wsae-recent-story.php on line 5
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/shortcodes-for-amp-web-stories-and-elementor-widget/includes/wsae-recent-story.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/shortcodes-for-amp-web-stories-and-elementor-widget/includes/wsae-recent-story.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/shortcodes-for-amp-web-stories-and-elementor-widget/includes/wsae-recent-story.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #3 (Web Stories Elementor Widget Preview)
You can look at the official readme.txt

shortcodes-for-amp-web-stories-and-elementor-widget/Shortcodes For AMP Web Stories and Elementor Widget.php 77% from 13 tests

The main file in "Web Stories Widgets For Elementor" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 173 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shortcodes-for-amp-web-stories-and-elementor-widget.php" instead of "Shortcodes For AMP Web Stories and Elementor Widget.php")

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
Success! There were no dangerous files found in this plugin868 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6192106642
CSS2123117
JavaScript2122109

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods31
▷ Static methods39.68%
▷ Public methods2580.65%
▷ Protected methods39.68%
▷ Private methods39.68%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/webstory.png20.81KB8.30KB▼ 60.10%