90% restricted-site-notifier

Code Review | Restricted Site Notifier

WordPress plugin Restricted Site Notifier scored90%from 54 tests.

About plugin

  • Plugin page: restricted-site-n...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2016
  • Latest release: Oct 26, 2022
  • Number of updates: 25
  • Update frequency: every 98.8 days
  • Top authors: fliz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Restricted Site Notifier
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.27 ▼8.59
Dashboard /wp-admin3.33 ▼0.0243.26 ▼16.22
Posts /wp-admin/edit.php3.38 ▲0.0245.89 ▼5.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.76 ▼14.00
Media Library /wp-admin/upload.php3.25 ▲0.0233.10 ▼1.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Restricted Site Notifier: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼0.934.46 ▲2.7443.38 ▼0.74
Dashboard /wp-admin2,208 ▲205.85 ▲0.98111.47 ▲5.6840.19 ▼0.35
Posts /wp-admin/edit.php2,091 ▲22.01 ▼0.0139.68 ▲3.1734.15 ▼0.33
Add New Post /wp-admin/post-new.php1,530 ▲1623.20 ▲5.49656.71 ▼24.6455.48 ▼1.12
Media Library /wp-admin/upload.php1,390 ▲24.23 ▼0.0495.68 ▼14.2842.15 ▼4.68

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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
Everything seems fine on the user side

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
4 plugin tags: restricted site access, restricted site status, admin icon, admin bar

restricted-site-notifier/restricted-site-notifier.php Passed 13 tests

The main PHP file in "Restricted Site Notifier" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
102 characters long description:
Add-on for Restricted Site Access plugin. Displays site's current restriction status in the admin bar.

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 plugin110 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22062100
CSS10010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
There are no PNG files in this plugin