10% rotem-products-shortcodes

Code Review | Rotem Products Shortcodes

WordPress plugin Rotem Products Shortcodes scored10%from 54 tests.

About plugin

  • Plugin page: rotem-products-sh...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.0
  • WordPress version: 6.3.1
  • First release: Jun 7, 2023
  • Latest release: Jun 7, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: yortem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /197 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/rotem-products-shortcodes/rotem-products-shortcodes.php+65
    require(wp-content/plugins/rotem-products-shortcodes/includes/class-rotem-Products-shortcodes.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.69ms] Passed 4 tests

Server-side resources used by Rotem Products Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.48 ▲1.09
Dashboard /wp-admin3.31 ▲0.0044.43 ▼8.26
Posts /wp-admin/edit.php3.36 ▲0.0045.03 ▼0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.02 ▼16.40
Media Library /wp-admin/upload.php3.23 ▲0.0032.23 ▼6.05

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Rotem Products Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.061.72 ▼0.2640.81 ▼2.49
Dashboard /wp-admin2,206 ▲184.84 ▼0.07108.99 ▼9.2538.49 ▼4.29
Posts /wp-admin/edit.php2,089 ▲32.03 ▼0.0236.89 ▼2.3932.68 ▲0.49
Add New Post /wp-admin/post-new.php1,535 ▲1323.32 ▲0.42626.42 ▼52.0050.75 ▼8.03
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0494.56 ▼52.2344.75 ▼16.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/rotem-products-shortcodes/public/partials/rotem-products-shortcodes-public-display.php
    • > /wp-content/plugins/rotem-products-shortcodes/admin/partials/rotem-products-shortcodes-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in rotem-products-shortcodes/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === rotem-products-shortcodes === )
You can look at the official readme.txt

rotem-products-shortcodes/rotem-products-shortcodes.php Passed 13 tests

The main PHP script in "Rotem Products Shortcodes" version 1.0.0 is automatically included on every request by WordPress
80 characters long description:
Add a button to the editor that create a [products] shorcode for Products plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected325 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12137550219
JavaScript4296577
Markdown18022
CSS2387

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
products-shortcode-button.png1.48KB1.59KB0.00%