84% member-content-visibility

Code Review | Member Content Visibility

WordPress plugin Member Content Visibility scored84%from 54 tests.

About plugin

  • Plugin page: member-content-vi...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Dec 22, 2015
  • Latest release: Oct 15, 2016
  • Number of updates: 5
  • Update frequency: every 59.6 days
  • Top authors: webilop (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /2,160 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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.16ms] Passed 4 tests

A check of server-side resources used by Member Content Visibility
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.17 ▼10.30
Dashboard /wp-admin3.31 ▼0.0448.57 ▼18.95
Posts /wp-admin/edit.php3.36 ▲0.0049.28 ▼0.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.07 ▼10.59
Media Library /wp-admin/upload.php3.23 ▲0.0035.65 ▲0.54

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Member Content Visibility
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.051.84 ▲0.0838.51 ▼4.43
Dashboard /wp-admin2,195 ▲185.58 ▼0.0987.82 ▼13.7939.11 ▼24.62
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0035.51 ▼5.2332.61 ▼5.27
Add New Post /wp-admin/post-new.php1,526 ▼222.95 ▼0.31643.97 ▲50.6759.25 ▲11.03
Media Library /wp-admin/upload.php1,403 ▲64.15 ▼0.05103.00 ▼12.4047.92 ▲3.59

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_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/member-content-visibility/member-content-visibility.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: visual composer, hide content, container

member-content-visibility/member-content-visibility.php 92% from 13 tests

The primary PHP file in "Member Content Visibility" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin82 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3142482

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity2.25
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin