84% rob-rat-out-blocker

Code Review | ROB (rat out blocker)

WordPress plugin ROB (rat out blocker) scored84%from 54 tests.

About plugin

  • Plugin page: rob-rat-out-blocker
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Feb 4, 2020
  • Latest release: Mar 3, 2021
  • Number of updates: 9
  • Update frequency: every 43.7 days
  • Top authors: stasionok (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /581 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.57ms] Passed 4 tests

Server-side resources used by ROB (rat out blocker)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.52 ▼2.72
Dashboard /wp-admin3.32 ▲0.0148.61 ▼0.52
Posts /wp-admin/edit.php3.43 ▲0.0745.81 ▼1.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.61 ▼1.50
Media Library /wp-admin/upload.php3.24 ▲0.0136.26 ▲0.70
ROB (rat out blocker) /wp-admin/tools.php?page=rob-rat-out-blocker3.2632.58

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ROB (rat out blocker)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▼0.271.81 ▼0.2744.03 ▼7.56
Dashboard /wp-admin2,210 ▲195.86 ▲0.75109.01 ▼6.2244.72 ▼2.57
Posts /wp-admin/edit.php2,090 ▲12.01 ▼0.0036.21 ▼1.2032.94 ▼1.83
Add New Post /wp-admin/post-new.php1,536 ▲323.01 ▼0.15655.67 ▲6.8660.32 ▼3.23
Media Library /wp-admin/upload.php1,389 ▲44.20 ▲0.0496.39 ▲2.1942.27 ▼1.92
ROB (rat out blocker) /wp-admin/tools.php?page=rob-rat-out-blocker8112.0321.7532.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=rob-rat-out-blocker
    • > Notice in wp-content/plugins/rob-rat-out-blocker/views/settings-page.php+13
    Undefined variable: error
    • > GET request to /wp-admin/tools.php?page=rob-rat-out-blocker
    • > Notice in wp-content/plugins/rob-rat-out-blocker/views/settings-page.php+14
    Undefined variable: success

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
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
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: block, external request, request, speed up, security...

rob-rat-out-blocker/bootstrap.php 92% from 13 tests

The principal PHP file in "ROB (rat out blocker)" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rob-rat-out-blocker.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected390 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP578158319
PO File1193971

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity22.00
▷ Minimum class complexity13.00
▷ Maximum class complexity31.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods1155.00%
▷ Public methods1575.00%
▷ Protected methods00.00%
▷ Private methods525.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin