78% beans-simple-shortcodes

Code Review | Beans Simple Shortcodes

WordPress plugin Beans Simple Shortcodes scored78%from 54 tests.

About plugin

  • Plugin page: beans-simple-shor...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 25, 2018
  • Latest release: Jun 27, 2018
  • Number of updates: 8
  • Update frequency: every 3.5 days
  • Top authors: Deftly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /637 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.01MB] [CPU: ▼8.68ms] Passed 4 tests

This is a short check of server-side resources used by Beans Simple Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.71 ▼0.90
Dashboard /wp-admin3.31 ▼0.0446.97 ▼12.88
Posts /wp-admin/edit.php3.36 ▲0.0045.23 ▼3.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.86 ▼17.92
Media Library /wp-admin/upload.php3.23 ▲0.0035.32 ▼0.06

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Beans Simple Shortcodes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.401.69 ▼0.0939.63 ▲1.28
Dashboard /wp-admin2,195 ▲145.59 ▼0.1397.56 ▼8.4245.70 ▲8.06
Posts /wp-admin/edit.php2,100 ▲32.02 ▼0.0141.98 ▲6.7736.73 ▲0.31
Add New Post /wp-admin/post-new.php1,539 ▲823.30 ▲0.09606.30 ▼34.0361.67 ▲4.91
Media Library /wp-admin/upload.php1,400 ▲64.19 ▼0.06117.15 ▲19.3048.49 ▲3.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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 fix the following items
  • 37× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/post_author_link/shortcode-label.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/date_posted/shortcode-label.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/post_categories/shortcode-label.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/date_updated/shortcode-attributes.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/post_author_link/shortcode-attributes.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/childtheme_link/shortcode-label.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/theme_link/shortcode-attributes.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/post_comments/shortcode-attributes.php
    • > /wp-content/plugins/beans-simple-shortcodes/src/views/admin-metabox-text/post_categories/shortcode-attributes.php
    • > /wp-content/plugins/beans-simple-shortcodes/plugin.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LearningCurve\\BeansSimpleShortcodes\\add_action() in wp-content/plugins/beans-simple-shortcodes/src/class-beans-simple-shortcodes.php:130
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/beans-simple-shortcodes/src/views/admin-screen.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: beans framework, beans, shortcodes, beans html api

beans-simple-shortcodes/plugin.php 92% from 13 tests

The main file in "Beans Simple Shortcodes" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("beans-simple-shortcodes.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,075 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP604631,0011,606
Markdown21470469

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
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
PNG images were not found in this plugin