90% content-visibility

Code Review | Content Visibility

WordPress plugin Content Visibility scored90%from 54 tests.

About plugin

  • Plugin page: content-visibility
  • Plugin version: 0.2.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2020
  • Latest release: Dec 13, 2022
  • Number of updates: 16
  • Update frequency: every 45.4 days
  • Top authors: iamfriendly (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /3,274 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.01MB] [CPU: ▼1.52ms] Passed 4 tests

A check of server-side resources used by Content Visibility
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.08 ▲0.45
Dashboard /wp-admin3.32 ▲0.0249.12 ▼1.21
Posts /wp-admin/edit.php3.37 ▲0.0149.15 ▼1.10
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.36 ▼4.20
Media Library /wp-admin/upload.php3.24 ▲0.0135.05 ▲0.59

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Content Visibility: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.22 ▼0.131.60 ▼0.4242.90 ▲0.16
Dashboard /wp-admin2,192 ▲145.56 ▼0.1787.12 ▼33.5240.08 ▼3.83
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.1835.34 ▼4.3236.71 ▼2.53
Add New Post /wp-admin/post-new.php1,695 ▲16922.86 ▼0.25674.57 ▼25.0661.87 ▲9.90
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0299.37 ▼14.2641.84 ▼4.40

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 detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
6 plugin tags: hide, visibility, contentvisibility, block, content...

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

The entry point to "Content Visibility" version 0.2.9 is a PHP file that has certain tags in its header comment area
89 characters long description:
Content Visibility allows you to decide when, where, and to whom your blocks are visible.

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
There were no executable files found in this plugin3,665 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17921,4632,852
PHP9321550644
CSS351112169

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity12.25
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin