79% hideshow-postpage-content

Code Review | Hide/Show Post/Page Content

WordPress plugin Hide/Show Post/Page Content scored79%from 54 tests.

About plugin

  • Plugin page: hideshow-postpage...
  • Plugin version: 1.5.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 21, 2020
  • Latest release: Dec 9, 2022
  • Number of updates: 39
  • Update frequency: every 22.4 days
  • Top authors: sosidee (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /3,181 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼5.34ms] Passed 4 tests

An overview of server-side resources used by Hide/Show Post/Page Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3646.25 ▲7.08
Dashboard /wp-admin3.68 ▲0.3451.62 ▼7.57
Posts /wp-admin/edit.php3.74 ▲0.3853.54 ▲4.55
Add New Post /wp-admin/post-new.php6.27 ▲0.3887.04 ▼19.04
Media Library /wp-admin/upload.php3.61 ▲0.3836.92 ▲0.70
Hide/Show Content /wp-admin/tools.php?page=sos-hsc-03.5735.14

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Hide/Show Post/Page Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.341.76 ▲0.0943.57 ▲3.90
Dashboard /wp-admin2,199 ▲255.63 ▲0.0591.52 ▲2.8241.90 ▼1.55
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0239.60 ▲3.3836.94 ▲3.00
Add New Post /wp-admin/post-new.php1,529 ▲323.78 ▲0.76675.79 ▲33.3368.20 ▲9.34
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.0694.53 ▼0.7640.51 ▼0.19
Hide/Show Content /wp-admin/tools.php?page=sos-hsc-08511.9821.0932.25

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 45× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/data/formfieldtype.php
    • > /wp-content/plugins/hideshow-postpage-content/translations.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/data/formbutton.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/data/encryption.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/script.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/be/navtab.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/data/formtag.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/htmltag.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/data/field.php
    • > /wp-content/plugins/hideshow-postpage-content/sos/wp/email.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'SOSIDEE_HSC\\SosPlugin' not found in wp-content/plugins/hideshow-postpage-content/admin/info.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: show content, hide image, show text, show image, show post content...

hideshow-postpage-content/hideshow-postpage-content.php Passed 13 tests

"Hide/Show Post/Page Content" version 1.5.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
128 characters long description:
Hide or show a selected content of public posts/pages depending on whether the user is logged or not. Compatible with Elementor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin5,051 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP468247454,831
PO File14593168
CSS14427
JavaScript20024
HTML1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.72
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces7
Interfaces0
Traits5
Classes38
▷ Abstract classes12.63%
▷ Concrete classes3797.37%
▷ Final classes00.00%
Methods337
▷ Static methods4713.95%
▷ Public methods24572.70%
▷ Protected methods5014.84%
▷ Private methods4212.46%
Functions39
▷ Named functions1743.59%
▷ Anonymous functions2256.41%
Constants44
▷ Global constants12.27%
▷ Class constants4397.73%
▷ Public constants43100.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