90% content-visibility-geolocation

Code Review | Content Visibility Geolocation

WordPress plugin Content Visibility Geolocation scored 90% from 54 tests.

About plugin

  • Plugin page: content-visibilit...
  • Plugin version: 0.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2021
  • Latest release: Dec 13, 2022
  • Number of updates: 4
  • Update frequency: every 153.8 days
  • Top authors: iamfriendly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.12ms] Passed 4 tests

This is a short check of server-side resources used by Content Visibility Geolocation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.24195.04 ▲155.48
Dashboard /wp-admin3.38 ▲0.0746.29 ▼0.45
Posts /wp-admin/edit.php3.43 ▲0.0747.67 ▼2.85
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.34 ▼8.54
Media Library /wp-admin/upload.php3.30 ▲0.0735.48 ▲3.38

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Content Visibility Geolocation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.19 ▼1.062.06 ▲0.3247.54 ▼2.39
Dashboard /wp-admin2,203 ▲185.84 ▲0.9596.36 ▼5.5135.90 ▼8.60
Posts /wp-admin/edit.php2,092 ▲62.02 ▼0.0234.23 ▼4.9832.16 ▼1.99
Add New Post /wp-admin/post-new.php1,536 ▲2221.04 ▲3.49713.88 ▲46.6553.69 ▲7.36
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.06103.25 ▲4.1343.39 ▼2.97

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected 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

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
6 plugin tags: geolocation, visibility, contentvisibility, location, content...

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

"Content Visibility Geolocation" version 0.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
[Content Visibility Add-On] Show or hide your blocks to visitors from specific countries.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,877 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP51874521,751
JavaScript12262361,126
CSS2420

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods35
▷ Static methods1234.29%
▷ Public methods2880.00%
▷ Protected methods00.00%
▷ Private methods720.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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
No PNG files were detected