84% os3-website-protector

Code Review | OS3 Website Protector

WordPress plugin OS3 Website Protector scored 84% from 54 tests.

About plugin

  • Plugin page: os3-website-prote...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 17, 2022
  • Latest release: Jun 17, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: fsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 663 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.07ms] Passed 4 tests

A check of server-side resources used by OS3 Website Protector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.25 ▼19.21
Dashboard /wp-admin3.33 ▲0.0246.81 ▼3.55
Posts /wp-admin/edit.php3.38 ▲0.0250.16 ▲0.71
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.81 ▲1.33
Media Library /wp-admin/upload.php3.25 ▲0.0234.06 ▼2.22
Website Protector /wp-admin/options-general.php?page=os3_protector_settings3.2231.30

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
os3_protector_uploads
widget_recent-posts
widget_theysaidso_widget
os3_protector_themes
os3_protector_plugins

Browser metrics Passed 4 tests

Checking browser requirements for OS3 Website Protector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.151.89 ▼0.0142.14 ▼2.95
Dashboard /wp-admin2,210 ▲225.90 ▲0.04103.57 ▼17.0339.49 ▼4.22
Posts /wp-admin/edit.php2,090 ▼22.02 ▲0.0040.29 ▼1.0035.17 ▼1.19
Add New Post /wp-admin/post-new.php1,536 ▲2223.35 ▲5.77603.70 ▼44.4970.02 ▲18.62
Media Library /wp-admin/upload.php1,392 ▲44.27 ▼0.0096.51 ▼2.4642.64 ▼3.44
Website Protector /wp-admin/options-general.php?page=os3_protector_settings8252.0324.8026.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • os3_protector_uploads
    • widget_theysaidso_widget
    • db_upgraded
    • os3_protector_plugins
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • os3_protector_themes
    • widget_recent-comments

Smoke tests 75% from 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 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/os3-website-protector/os3-protector.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The OS3 Website Protector settings page) image not found
The official readme.txt is a good inspiration

os3-website-protector/os3-protector.php 92% from 13 tests

This is the main PHP file of "OS3 Website Protector" version 0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("os3-website-protector.php" instead of "os3-protector.php")

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
There were no executable files found in this plugin166 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12428134
Markdown212019
Bourne Shell13013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions6
▷ Named functions6100.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
There were not PNG files found in your plugin