78% nd-shortcodes

Code Review | ND Shortcodes

WordPress plugin ND Shortcodes scored78%from 54 tests.

About plugin

  • Plugin page: nd-shortcodes
  • Plugin version: 7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4
  • WordPress version: 6.3.1
  • First release: Jun 15, 2016
  • Latest release: Nov 21, 2023
  • Number of updates: 184
  • Update frequency: every 14.8 days
  • Top authors: nicdark (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

20,000+ active /313,438 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.88ms] Passed 4 tests

This is a short check of server-side resources used by ND Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0745.12 ▲4.06
Dashboard /wp-admin3.37 ▲0.0250.48 ▼8.72
Posts /wp-admin/edit.php3.42 ▲0.0655.84 ▲6.07
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.87 ▼6.05
Media Library /wp-admin/upload.php3.29 ▲0.0640.05 ▲3.21

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 618 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ND Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12713.72 ▼0.638.01 ▲6.5043.30 ▼0.42
Dashboard /wp-admin2,210 ▲335.64 ▲0.0095.38 ▼1.6041.71 ▼0.35
Posts /wp-admin/edit.php2,118 ▲182.02 ▼0.0035.08 ▼4.8133.20 ▼3.10
Add New Post /wp-admin/post-new.php1,541 ▲1523.50 ▲0.07692.99 ▼3.2058.86 ▲6.19
Media Library /wp-admin/upload.php1,415 ▲154.22 ▲0.0698.15 ▲4.2641.46 ▼0.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nd-shortcodes/addons/eventscalendar/customizer/styles/default-style.php
    • > /wp-content/plugins/nd-shortcodes/addons/customizer/header/header-5/style.php
    • > /wp-content/plugins/nd-shortcodes/addons/customizer/header/header-6/style.php
    • > /wp-content/plugins/nd-shortcodes/addons/woocommerce/customizer/styles/default-style.php
  • 803× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: nd_options_minutes_color in wp-content/plugins/nd-shortcodes/shortcodes/custom/countdown/layout/layout-3.php on line 26
    • > PHP Notice
      Undefined variable: nd_options_seconds_bg_color in wp-content/plugins/nd-shortcodes/shortcodes/custom/countdown/layout/layout-2.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nd-shortcodes/addons/eventscalendar/customizer/styles/custom-style-1.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/nd-shortcodes/addons/woocommerce/template/single/layout/layout-4.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nd-shortcodes/shortcodes/focus/layout/layout-5.php on line 11
    • > PHP Notice
      Undefined variable: str in wp-content/plugins/nd-shortcodes/shortcodes/testimonial/layout/layout-1.php on line 23
    • > PHP Notice
      Undefined variable: nd_options_link_url in wp-content/plugins/nd-shortcodes/shortcodes/custom/service/layout/layout-1.php on line 10
    • > PHP Notice
      Undefined variable: nd_options_link_target_output in wp-content/plugins/nd-shortcodes/shortcodes/custom/service/layout/layout-3.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nd-shortcodes/shortcodes/custom/price/index.php:4
    • > PHP Notice
      Undefined variable: str in wp-content/plugins/nd-shortcodes/shortcodes/custom/service/layout/layout-7.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: elementor, elementor sections, wp bakery page builder, elementor templates, elementor pages...

nd-shortcodes/nd-shortcodes.php 92% from 13 tests

The entry point to "ND Shortcodes" version 7.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)

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 detected43,668 lines of code in 377 files:
LanguageFilesBlank linesComment linesLines of code
PHP28710,9912,47327,726
PO File135,0186,23110,276
SVG5817503,157
CSS93041941,587
JavaScript10345759922

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions217
▷ Named functions217100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
41 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
addons/customizer/footer/footer-2/logo.png2.99KB1.45KB▼ 51.42%
addons/locations/img/gmaps/layout-1/m5.png1.88KB0.74KB▼ 60.77%
addons/locations/img/icons/icon-add-white.png0.61KB0.16KB▼ 74.28%
addons/customizer/header/header-4/img/logo.png3.10KB1.45KB▼ 53.18%
shortcodes/custom/toogle/icon-less-white.png0.38KB0.13KB▼ 66.15%