78% hide-content

Code Review | Hide Content

WordPress plugin Hide Content scored78%from 54 tests.

About plugin

  • Plugin page: hide-content
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Dec 25, 2014
  • Latest release: Jan 18, 2015
  • Number of updates: 7
  • Update frequency: every 3.4 days
  • Top authors: Dimas_Odessa (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,385 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.58ms] Passed 4 tests

An overview of server-side resources used by Hide Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.66 ▲7.10
Dashboard /wp-admin3.33 ▲0.0352.46 ▼0.03
Posts /wp-admin/edit.php3.39 ▲0.0344.32 ▼6.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.86 ▼22.40
Media Library /wp-admin/upload.php3.26 ▲0.0336.51 ▼1.43

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3313.48 ▼0.904.38 ▲2.4540.74 ▼12.09
Dashboard /wp-admin2,225 ▲225.85 ▲0.91105.19 ▲2.3937.12 ▼10.49
Posts /wp-admin/edit.php2,101 ▲12.01 ▼0.0036.20 ▼1.2833.70 ▼2.01
Add New Post /wp-admin/post-new.php1,548 ▲323.16 ▲0.23609.53 ▼109.4360.36 ▼1.86
Media Library /wp-admin/upload.php1,404 ▲74.20 ▼0.06109.35 ▼6.1146.79 ▼2.67
Hide Content /wp-admin/hide-content-options.php260.440.1415.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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)
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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hide-content/hide-content.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/hide-content-options.php
    • > Network (severe)
    wp-admin/hide-content-options.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === hide-content === )
You can look at the official readme.txt

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

The main PHP file in "Hide Content" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
49 characters long description:
Plugin hides the content from unauthorized users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected221 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2339176
JavaScript11926
PO File13119

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.31
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png6.38KB1.21KB▼ 80.96%
screenshot_1.png4.72KB3.35KB▼ 29.05%