84% shortcodes-to-show-or-hide-content

Code Review | Show/Hide Content at Set Time

WordPress plugin Show/Hide Content at Set Time scored84%from 54 tests.

About plugin

  • Plugin page: shortcodes-to-sho...
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.2.3
  • WordPress version: 6.3.1
  • First release: Jun 24, 2011
  • Latest release: Oct 1, 2019
  • Number of updates: 87
  • Update frequency: every 34.7 days
  • Top authors: thewanderingbrit (94.25%)deployer (6.9%)

Code review

54 tests

User reviews

33 reviews

Install metrics

10,000+ active /37,027 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.03MB] [CPU: ▼2.99ms] Passed 4 tests

Analyzing server-side resources used by Show/Hide Content at Set Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.70 ▲0.86
Dashboard /wp-admin3.33 ▲0.0354.70 ▲0.59
Posts /wp-admin/edit.php3.38 ▲0.0349.91 ▼4.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.45 ▼3.61
Media Library /wp-admin/upload.php3.26 ▲0.0332.96 ▼4.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Show/Hide Content at Set Time
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.171.76 ▼0.2043.67 ▲0.59
Dashboard /wp-admin2,206 ▲185.91 ▲0.8594.69 ▼14.0338.84 ▼4.82
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0237.94 ▼3.2032.37 ▼2.38
Add New Post /wp-admin/post-new.php1,533 ▲1923.14 ▲5.49701.94 ▲14.0052.32 ▼13.71
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0598.43 ▼10.9243.63 ▼1.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-to-show-or-hide-content/includes/shortcodes.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcodes-to-show-or-hide-content/includes/retired-shortcodes.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/shortcodes-to-show-or-hide-content/shortcodes-to-show-or-hide-content.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (33 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

shortcodes-to-show-or-hide-content/shortcodes-to-show-or-hide-content.php Passed 13 tests

This is the main PHP file of "Show/Hide Content at Set Time" version 2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
66 characters long description:
Set a date/time to show or hide specific parts of a post's content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin243 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33771227
YAML13016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code1.77
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin