10% hide-for-group-roles

Code Review | Hide for group (roles)

WordPress plugin Hide for group (roles) scored 10% from 54 tests.

About plugin

  • Plugin page: hide-for-group-roles
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Sep 6, 2014
  • Latest release: Sep 6, 2014
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: maffay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,140 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Compile error in wp-content/plugins/hide-for-group-roles/index.php+939
    Cannot redeclare add_term_meta() (previously declared in wp-includes/taxonomy.php:1346)

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

Analyzing server-side resources used by Hide for group (roles)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.58 ▲3.07
Dashboard /wp-admin3.31 ▲0.0058.88 ▼13.47
Posts /wp-admin/edit.php3.36 ▲0.0046.35 ▼4.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.52 ▼122.15
Media Library /wp-admin/upload.php3.23 ▲0.0036.88 ▼1.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Hide for group (roles): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.56 ▼0.822.42 ▲0.3161.91 ▲12.21
Dashboard /wp-admin2,194 ▲35.82 ▼0.08125.07 ▲11.3759.30 ▲17.25
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0636.14 ▼9.7936.10 ▼0.73
Add New Post /wp-admin/post-new.php1,542 ▲518.71 ▼4.52655.64 ▼131.3052.76 ▲5.65
Media Library /wp-admin/upload.php1,388 ▲34.15 ▼0.08112.79 ▼21.0245.51 ▼12.98

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

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 require attention:
  • Screenshots: These screenshots require images: #1 (Post or page settings area), #2 (Category, tags or tax setting area), #3 (Plugins admin settings page), #4 (Example hidden text in content), #5 (Hidden post for loop)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

hide-for-group-roles/index.php 92% from 13 tests

The main PHP file in "Hide for group (roles)" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hide-for-group-roles.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected721 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1284239621
PO File13141100

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png40.82KB20.55KB▼ 49.66%
screenshot-2.png26.93KB9.85KB▼ 63.40%
screenshot-4.png16.70KB6.59KB▼ 60.55%
screenshot-1.png27.86KB9.13KB▼ 67.21%
screenshot-3.png58.72KB21.55KB▼ 63.30%