78% themify-shortcodes

Code Review | Themify Shortcodes

WordPress plugin Themify Shortcodes scored78%from 54 tests.

About plugin

  • Plugin page: themify-shortcodes
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2017
  • Latest release: Jan 4, 2023
  • Number of updates: 136
  • Update frequency: every 15.5 days
  • Top authors: themifyme (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10,000+ active /91,744 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▲0.96ms] Passed 4 tests

This is a short check of server-side resources used by Themify Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2438.98 ▼2.36
Dashboard /wp-admin3.94 ▲0.6357.95 ▲9.32
Posts /wp-admin/edit.php3.68 ▲0.3251.84 ▲0.42
Add New Post /wp-admin/post-new.php6.17 ▲0.2995.28 ▼1.66
Media Library /wp-admin/upload.php3.86 ▲0.6340.71 ▲7.45
Themify Shortcodes /wp-admin/options-general.php?page=themify-shortcodes3.4540.30

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

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

Browser metrics Passed 4 tests

Themify Shortcodes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.83 ▲0.021.68 ▼0.5342.07 ▼3.10
Dashboard /wp-admin2,210 ▲225.84 ▼0.07102.62 ▼10.5439.28 ▼5.09
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0438.68 ▼1.3735.02 ▼2.98
Add New Post /wp-admin/post-new.php1,581 ▲4823.35 ▲0.45634.87 ▼47.4453.92 ▲0.45
Media Library /wp-admin/upload.php1,426 ▲384.20 ▼0.0993.11 ▼11.1742.80 ▼0.90
Themify Shortcodes /wp-admin/options-general.php?page=themify-shortcodes8612.0523.0027.53

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/themify-shortcodes/init.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themify-shortcodes/includes/theme-options.php:111
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_single() in wp-content/plugins/themify-shortcodes/templates/loop.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/themify-shortcodes/includes/shortcodes.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
Please take inspiration from this readme.txt

themify-shortcodes/init.php 92% from 13 tests

The principal PHP file in "Themify Shortcodes" v. 2.0.8 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("themify-shortcodes.php" instead of "init.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
Success! There were no dangerous files found in this plugin13,139 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
SVG3008,611
PHP102534522,212
CSS51782,006
JavaScript53015310

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.40
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods32
▷ Static methods721.88%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png0.72KB0.67KB▼ 6.41%