84% wp-conditional-shortcodes

Code Review | WP Conditional Shortcodes

WordPress plugin WP Conditional Shortcodes scored 84% from 54 tests.

About plugin

  • Plugin page: wp-conditional-sh...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2013
  • Latest release: Feb 27, 2013
  • Number of updates: 4
  • Update frequency: every 4.8 days
  • Top authors: TomHarrigan (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active / 2,627 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.01MB] [CPU: ▼3.69ms] Passed 4 tests

An overview of server-side resources used by WP Conditional Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.02 ▼6.45
Dashboard /wp-admin3.31 ▲0.0145.63 ▼5.45
Posts /wp-admin/edit.php3.36 ▲0.0146.84 ▼0.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.43 ▲4.13
Media Library /wp-admin/upload.php3.24 ▲0.0135.04 ▼2.43

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Conditional Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.204.60 ▲2.8437.30 ▼2.68
Dashboard /wp-admin2,206 ▲185.91 ▲0.05106.25 ▼3.1139.88 ▼6.02
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0246.65 ▲4.6534.50 ▼4.01
Add New Post /wp-admin/post-new.php1,541 ▲518.49 ▼4.90614.51 ▲26.8948.75 ▲5.76
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0197.52 ▼5.8643.63 ▲0.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-conditional-shortcodes/conditional_shortcodes.php:149

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: shortcodes, conditional, conditional tags, shortcode

wp-conditional-shortcodes/conditional_shortcodes.php 92% from 13 tests

The principal PHP file in "WP Conditional Shortcodes" v. 1.1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-conditional-shortcodes.php" instead of "conditional_shortcodes.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
Everything looks great! No dangerous files found in this plugin114 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13619114

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin