74% shortcode-datastore

Code Review | Shortcode Datastore

WordPress plugin Shortcode Datastore scored 74% from 54 tests.

About plugin

  • Plugin page: shortcode-datastore
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Feb 9, 2020
  • Latest release: May 28, 2022
  • Number of updates: 7
  • Update frequency: every 121.1 days
  • Top authors: azumbro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,575 total downloads

Benchmarks

Plugin footprint 65% 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.04MB] [CPU: ▼3.61ms] Passed 4 tests

Analyzing server-side resources used by Shortcode Datastore
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.53 ▼8.33
Dashboard /wp-admin3.34 ▲0.0444.84 ▼4.29
Posts /wp-admin/edit.php3.39 ▲0.0446.26 ▲0.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.58 ▼2.66
Media Library /wp-admin/upload.php3.27 ▲0.0434.39 ▲1.25

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: 1 new table, 7 new options
New tables
wp_sds_data
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
sdsDBSchemaVersion

Browser metrics Passed 4 tests

A check of browser resources used by Shortcode Datastore
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.25 ▼1.501.66 ▼0.2641.21 ▼5.33
Dashboard /wp-admin2,222 ▲364.83 ▼0.08109.74 ▼6.1442.81 ▼1.38
Posts /wp-admin/edit.php2,108 ▲192.03 ▼0.0239.10 ▼4.6633.63 ▼1.93
Add New Post /wp-admin/post-new.php1,547 ▲2523.11 ▼0.20658.79 ▼33.2160.87 ▲3.51
Media Library /wp-admin/upload.php1,404 ▲164.21 ▼0.07108.60 ▲3.3246.27 ▲1.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_sds_data
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • sdsDBSchemaVersion
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/shortcode-datastore/shortcodeDatastore.php

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: shortcode, variables, datastore

shortcode-datastore/shortcodeDatastore.php 85% from 13 tests

The main PHP file in "Shortcode Datastore" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 224 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("shortcode-datastore.php" instead of "shortcodeDatastore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin163 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1554163

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 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/ShortcodeDatastoreLogo.png21.23KB6.47KB▼ 69.51%