89% genesis-shortcode-generator

Code Review | Genesis Shortcode Generator

WordPress plugin Genesis Shortcode Generator scored89%from 54 tests.

About plugin

  • Plugin page: genesis-shortcode...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.5.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2014
  • Latest release: May 8, 2016
  • Number of updates: 28
  • Update frequency: every 29.5 days
  • Top authors: joshlimecuda (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /7,383 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Genesis Shortcode Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.74 ▲1.62
Dashboard /wp-admin3.32 ▼0.0348.81 ▼7.58
Posts /wp-admin/edit.php3.37 ▲0.0144.80 ▼1.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.32 ▼10.86
Media Library /wp-admin/upload.php3.24 ▲0.0133.55 ▼0.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Genesis Shortcode Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5314.17 ▼0.081.87 ▲0.3643.61 ▲2.16
Dashboard /wp-admin2,202 ▲225.66 ▲0.1395.52 ▲7.7744.04 ▲1.62
Posts /wp-admin/edit.php2,110 ▲102.04 ▲0.0633.26 ▼3.8533.03 ▼2.23
Add New Post /wp-admin/post-new.php1,536 ▲123.17 ▲4.89611.98 ▼48.4854.55 ▼23.34
Media Library /wp-admin/upload.php1,410 ▲74.19 ▼0.0194.25 ▼0.7041.23 ▼3.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

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
2 plugin tags: shortcodes, genesis

genesis-shortcode-generator/genesis-shortcode-generator.php 85% from 13 tests

The main PHP file in "Genesis Shortcode Generator" ver. 2.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected413 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP993158236
JavaScript100174
CSS1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods21
▷ Static methods628.57%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/genesis-icon.png3.26KB0.52KB▼ 83.97%