94% groups-blog-protect

Code Review | Groups Blog Protect

WordPress plugin Groups Blog Protect scored 94% from 54 tests.

About plugin

  • Plugin page: groups-blog-protect
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: Feb 6, 2013
  • Latest release: Apr 2, 2021
  • Number of updates: 9
  • Update frequency: every 330.8 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,839 total downloads


Plugin footprint Passed 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.04MB] [CPU: ▼140.54ms] Passed 4 tests

This is a short check of server-side resources used by Groups Blog Protect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1634.09 ▲11.15
Dashboard /wp-admin3.10 ▲0.0538.39 ▼8.02
Posts /wp-admin/edit.php3.16 ▲0.0544.47 ▲0.48
Add New Post /wp-admin/post-new.php5.47 ▲0.0490.30 ▼553.23
Media Library /wp-admin/upload.php3.05 ▲0.0533.07 ▼1.39
Groups Blog Protect /wp-admin/options-general.php?page=groups-blog-protect3.0221.95

Server storage [IO: ▲0.10MB] [DB: ▲0.62MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Groups Blog Protect: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲10215.94 ▲0.305.03 ▼2.1845.58 ▼1.56
Dashboard /wp-admin2,978 ▲475.87 ▼0.07132.95 ▼6.49121.47 ▼1.16
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0171.44 ▲1.2193.53 ▲0.16
Add New Post /wp-admin/post-new.php1,501 ▼37118.80 ▼0.32387.09 ▼2.12108.15 ▼3.32
Media Library /wp-admin/upload.php1,812 ▲85.01 ▲0.01151.02 ▼6.02126.68 ▲7.95
Groups Blog Protect /wp-admin/options-general.php?page=groups-blog-protect1,0012.0652.4758.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.62MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/groups-blog-protect/groups-blog-protect.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Groups Blog Protect settings.) image required
Please take inspiration from this readme.txt

groups-blog-protect/groups-blog-protect.php Passed 13 tests

The main PHP script in "Groups Blog Protect" version 1.3.0 is automatically included on every request by WordPress
64 characters long description:
Protect access to blogs via group memberships powered by Groups.

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 detected197 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

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.30
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods8100.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png50.02KB17.31KB▼ 65.41%