10% website-openclosed-toggle

Code Review | Website Open/Closed Toggle

WordPress plugin Website Open/Closed Toggle scored 10% from 54 tests.

About plugin

  • Plugin page: website-openclose...
  • Plugin version: 0.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Jun 16, 2022
  • Number of updates: 40
  • Update frequency: every 59.8 days
  • Top authors: RSimpson (95%)rsdotscot (7.5%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 7,957 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/website-openclosed-toggle/website-openclosed-toggle.php+38
    Only variables should be passed by reference

Server metrics [RAM: ▼1.93MB] [CPU: ▼51.26ms] Passed 4 tests

An overview of server-side resources used by Website Open/Closed Toggle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.45 ▼36.79
Dashboard /wp-admin2.08 ▼1.235.63 ▼44.14
Posts /wp-admin/edit.php2.08 ▼1.285.51 ▼38.38
Add New Post /wp-admin/post-new.php2.08 ▼3.816.12 ▼85.74
Media Library /wp-admin/upload.php2.08 ▼1.155.35 ▼29.06

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
rs_woct_settings
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Website Open/Closed Toggle
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.37 ▼1.291.99 ▲0.1842.80 ▼5.70
Dashboard /wp-admin2,215 ▲275.77 ▼0.10109.78 ▼8.6536.76 ▼10.98
Posts /wp-admin/edit.php2,101 ▲121.99 ▼0.0040.58 ▲0.0935.70 ▲2.85
Add New Post /wp-admin/post-new.php1,552 ▲1618.56 ▼5.01650.08 ▲31.2952.93 ▼12.70
Media Library /wp-admin/upload.php1,394 ▲34.22 ▲0.0197.25 ▼5.0042.56 ▼2.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/website-openclosed-toggle/website-openclosed-toggle.php+38
    Only variables should be passed by reference
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • rs_woct_settings
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

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 to be fixed: Please take inspiration from this readme.txt

website-openclosed-toggle/website-openclosed-toggle.php Passed 13 tests

The primary PHP file in "Website Open/Closed Toggle" version 0.3.8 is used by WordPress to initiate all plugin functionality
115 characters long description:
This plugin allows you to easily open and close your website and display a custom message or HTML page when closed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin294 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP93522292
CSS1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected