94% display-during-conditional-shortcode

Code Review | Display During Conditional Shortcode

WordPress plugin Display During Conditional Shortcode scored 94% from 54 tests.

About plugin

  • Plugin page: display-during-co...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.8
  • WordPress version: 5.8.1
  • First release: Mar 8, 2013
  • Latest release: Jul 23, 2021
  • Number of updates: 25
  • Update frequency: every 122.4 days
  • Top authors: gserafini (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 2,260 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼142.42ms] Passed 4 tests

Analyzing server-side resources used by Display During Conditional Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.77 ▲13.62
Dashboard /wp-admin3.06 ▲0.0144.22 ▼0.39
Posts /wp-admin/edit.php3.12 ▲0.0141.54 ▼2.21
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.08 ▼568.50
Media Library /wp-admin/upload.php3.01 ▲0.0133.55 ▲1.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Display During Conditional Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8415.82 ▲0.4310.52 ▲2.6351.53 ▲0.82
Dashboard /wp-admin2,967 ▲365.81 ▼0.18140.17 ▼7.25117.56 ▼3.01
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0066.06 ▲0.5692.53 ▲2.31
Add New Post /wp-admin/post-new.php1,672 ▼1119.01 ▲2.89393.95 ▲3.60106.45 ▼12.37
Media Library /wp-admin/upload.php1,748 ▼594.99 ▲0.00150.20 ▼19.25122.24 ▼14.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/display-during-conditional-shortcode/display-during-conditional-shortcode.php:84

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: display, conditional, shortcode, strtotime

display-during-conditional-shortcode/display-during-conditional-shortcode.php 92% from 13 tests

This is the main PHP file of "Display During Conditional Shortcode" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 882 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis 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.57
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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
PNG images were not found in this plugin