67% synved-shortcodes

Code Review | WordPress Shortcodes

WordPress plugin WordPress Shortcodes scored 67% from 54 tests.

About plugin

  • Plugin page: synved-shortcodes
  • Plugin version: 1.6.36
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7
  • WordPress version: 5.9.2
  • First release: Sep 2, 2012
  • Latest release: Oct 8, 2016
  • Number of updates: 134
  • Update frequency: every 11.2 days
  • Top authors: Synved (100%)

Code review

54 tests

User reviews

56 reviews

Install metrics

4,000+ active / 267,801 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.40MB] [CPU: ▼348.56ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.97 ▼0.5419.74 ▼39.89
Dashboard /wp-admin2.99 ▼0.4218.91 ▼18.43
Posts /wp-admin/edit.php2.99 ▼0.6517.97 ▼22.28
Add New Post /wp-admin/post-new.php2.99 ▼3.9816.83 ▼1,311.75
Media Library /wp-admin/upload.php2.99 ▼0.3015.72 ▼20.30
Shortcodes /wp-admin/options-general.php?page=synved_shortcode_synved_shortcode2.9920.59

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 120 new files
Database: no new tables, 1 new option
New WordPress options
synved_connect_install_date

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,023 ▲26917.60 ▲1.8214.58 ▲7.612.74 ▼0.30
Dashboard /wp-admin2,973 ▲1156.88 ▲0.79137.42 ▼3.77216.59 ▲59.89
Posts /wp-admin/edit.php2,697 ▲63.25 ▲0.0282.76 ▲13.21144.53 ▲4.45
Add New Post /wp-admin/post-new.php1,685 ▲2416.33 ▲0.21407.21 ▼52.33226.64 ▲57.81
Media Library /wp-admin/upload.php1,697 ▼15.96 ▲0.42172.60 ▲26.79237.46 ▲43.10
Shortcodes /wp-admin/options-general.php?page=synved_shortcode_synved_shortcode1,2853.0880.98258.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode-item.php+204
    preg_match(): No ending delimiter '.' found
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • synved_connect_install_date

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=synved_shortcode_synved_shortcode
    • > Warning in wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode-item.php+204
    preg_match(): No ending delimiter '.' found
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=synved_shortcode_synved_shortcode
    • > Deprecated in wp-content/plugins/synved-shortcodes/synved-option/synved-option.php+601
    Function create_function() is deprecated

SRP 50% 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
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/synved-shortcodes/synved-connect/synved-connect.php:212
    • > PHP Fatal error
      Uncaught Error: Call to undefined function synved_option_callback() in wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode-setup.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/synved-shortcodes/synved-connect/synved-connect.php:212
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/synved-shortcodes/synved-option/synved-option.php:1124
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/synved-shortcodes/synved-option/addons/option-type-addon/option-type-addon.php:194
    • > PHP Fatal error
      Uncaught Error: Call to undefined function synved_option_callback() in wp-content/plugins/synved-shortcodes/synved-shortcode/synved-shortcode-setup.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This is the Shortcodes Editor that pops up in the edit post interface), #2 (Another example of the Shortcodes Editor), #3 (An example of creating tabs with the shortcodes and the [SlickPanel skin](http://synved.com/product/wordpress-shortcodes-slickpanel-skin/)), #4 (An example of creating sections with the shortcodes and the [SlickPanel skin](http://synved.com/product/wordpress-shortcodes-slickpanel-skin/)), #5 (An example of creating message boxes with the shortcodes and the [SlickPanel skin](http://synved.com/product/wordpress-shortcodes-slickpanel-skin/)), #6 (An example of a user link shortcode customized as an author card or "vcard"), #7 (Same as the above but using the [SlickPanel skin](http://synved.com/product/wordpress-shortcodes-slickpanel-skin/)), #8 (How the [SlickPanel skin](http://synved.com/product/wordpress-shortcodes-slickpanel-skin/ "Transform the look of many elements in the Shortcodes plugin!") will transform the look of the shortcodes), #9 (Another example of the Shortcodes Editor with the full list of shortcodes (using the old interface)), #10 (Another example of the Shortcodes Editor showing a partial list of some of the shortcodes (using the new interface))
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can take inspiration from this readme.txt

synved-shortcodes/synved-wp-shortcodes.php 85% from 13 tests

The principal PHP file in "WordPress Shortcodes" v. 1.6.36 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("synved-shortcodes.php" instead of "synved-wp-shortcodes.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected10,613 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,4741726,050
JavaScript244082952,921
CSS11891111,642

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods111.11%
▷ Private methods00.00%
Functions198
▷ Named functions198100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants1376.47%
▷ Class constants423.53%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
55 PNG files occupy 0.71MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
synved-option/jqueryUI/css/snvdopt/images/ui-icons_2e83ff_256x240.png5.23KB4.11KB▼ 21.49%
synved-option/jqueryUI/css/snvdopt/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
synved-option/farbtastic/mask.png1.97KB4.18KB0.00%
synved-connect/image/twitter.png1.09KB1.05KB▼ 3.23%
synved-shortcode/image/box/info.png0.76KB0.83KB0.00%