84% show-hide-content

Code Review | Show Hide Content

WordPress plugin Show Hide Content scored84%from 54 tests.

About plugin

  • Plugin page: show-hide-content
  • Plugin version: 1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: Jul 27, 2021
  • Number of updates: 16
  • Update frequency: every 131.7 days
  • Top authors: pluspt2001 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by Show Hide Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.83 ▼4.92
Dashboard /wp-admin3.32 ▼0.0351.95 ▼7.28
Posts /wp-admin/edit.php3.37 ▲0.0148.24 ▼3.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.48 ▼10.80
Media Library /wp-admin/upload.php3.24 ▲0.0137.82 ▼1.83

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Show Hide Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8613.56 ▼0.838.45 ▲6.3345.66 ▲3.68
Dashboard /wp-admin2,192 ▲185.55 ▼0.0184.07 ▼6.7839.62 ▼1.33
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0339.67 ▲3.2635.94 ▲0.63
Add New Post /wp-admin/post-new.php1,527 ▼123.17 ▲2.03667.97 ▼24.3763.38 ▲3.07
Media Library /wp-admin/upload.php1,403 ▲64.18 ▼0.05100.66 ▼14.5945.42 ▼1.70

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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 items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/show-hide-content/show-hide-content.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/show-hide-content/includes/shc_data-processing.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-hide-content/includes/shc_scripts.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Icon.png) image missing
The official readme.txt is a good inspiration

show-hide-content/show-hide-content.php Passed 13 tests

This is the main PHP file of "Show Hide Content" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
A plugin to create a readmore button on your blog

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
No dangerous file extensions were detected78 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3314843
JavaScript213828
CSS1407

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/js/favicons/Readmore.png5.09KB3.32KB▼ 34.82%