10% shortcode-express

Code Review | Shortcode Express

WordPress plugin Shortcode Express scored10%from 54 tests.

About plugin

  • Plugin page: shortcode-express
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 6, 2014
  • Latest release: Jun 6, 2014
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: Gasymail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,050 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/shortcode-express/index.php+245
    Methods with the same name as their class will not be constructors in a future version of PHP; shortcode_express_widget has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼59.02ms] Passed 4 tests

An overview of server-side resources used by Shortcode Express
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.38 ▼42.51
Dashboard /wp-admin2.16 ▼1.145.78 ▼50.75
Posts /wp-admin/edit.php2.16 ▼1.196.95 ▼46.12
Add New Post /wp-admin/post-new.php2.16 ▼3.726.40 ▼96.68
Media Library /wp-admin/upload.php2.16 ▼1.065.73 ▼30.52
Shortcode Express /wp-admin/tools.php?page=shortcode-express2.165.89

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: 1 new table, 8 new options
New tables
wp_shortcodeexpress
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
sce_version
widget_shortcode_express_widget

Browser metrics Passed 4 tests

A check of browser resources used by Shortcode Express
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.18 ▼1.211.73 ▼0.2343.14 ▲0.59
Dashboard /wp-admin2,212 ▲215.88 ▲0.99101.61 ▼7.0139.89 ▼1.37
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0636.45 ▼0.4033.10 ▼3.23
Add New Post /wp-admin/post-new.php1,547 ▲1918.12 ▼0.23647.33 ▼11.5763.13 ▼6.38
Media Library /wp-admin/upload.php1,394 ▲94.26 ▲0.0697.59 ▼5.2248.39 ▲1.35
Shortcode Express /wp-admin/tools.php?page=shortcode-express1,0292.5841.2526.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/shortcode-express/index.php+245
    Methods with the same name as their class will not be constructors in a future version of PHP; shortcode_express_widget has a deprecated constructor
  • Zombie tables detected upon uninstall: 1 table
    • wp_shortcodeexpress
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_shortcode_express_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • sce_version
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=shortcode-express
    • > Deprecated in wp-content/plugins/shortcode-express/index.php+245
    Methods with the same name as their class will not be constructors in a future version of PHP; shortcode_express_widget has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=shortcode-express
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in shortcode_express_widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/shortcode-express/index.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (The Shortcode Express admin page (Tools -> Shortcode Express)), #2 (Media button to select and add shortcode to page or post), #3 (The Shortcode Express widget)
Please take inspiration from this readme.txt

shortcode-express/index.php 92% from 13 tests

The entry point to "Shortcode Express" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shortcode-express.php" instead of "index.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
Good job! No executable or dangerous file extensions detected10,005 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript138244767,555
HTML1020611,506
CSS314842725
PHP15459219

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.00
▷ Minimum class complexity6.00
▷ Maximum class complexity14.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
8 PNG files occupy 0.27MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png23.48KB9.33KB▼ 60.27%
screenshot-1.png98.47KB33.81KB▼ 65.66%
shortcode_express_screenshot-2.png23.48KB9.33KB▼ 60.27%
shortcode_express_screenshot-3.png17.70KB6.31KB▼ 64.37%
js/select2/select2x2.png0.83KB0.77KB▼ 6.15%