82% block-spammers

Code Review | Block Spammers

WordPress plugin Block Spammers scored 82% from 53 tests.

About plugin

  • Plugin page: block-spammers
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.0
  • WordPress version: 5.8.1
  • First release: Jan 21, 2015
  • Latest release: Oct 25, 2018
  • Number of updates: 12
  • Update frequency: every 114.4 days
  • Top authors: sander85 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

100+ active / 1,953 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼267.06ms] Passed 4 tests

Server-side resources used by Block Spammers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1837.64 ▲17.26
Dashboard /wp-admin3.14 ▲0.0940.74 ▼2.68
Posts /wp-admin/edit.php3.19 ▲0.0942.92 ▲0.70
Add New Post /wp-admin/post-new.php5.50 ▲0.07100.52 ▼1,066.18
Media Library /wp-admin/upload.php3.08 ▲0.0835.58 ▼0.07
Block Spammers /wp-admin/options-general.php?page=wbs-admin3.0328.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Block Spammers
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲7215.94 ▲0.347.97 ▲0.0444.98 ▼4.15
Dashboard /wp-admin2,935 ▲825.90 ▲0.03134.03 ▲2.19105.47 ▲1.51
Posts /wp-admin/edit.php2,708 ▲22.69 ▼0.0065.30 ▲0.7694.43 ▲3.59
Add New Post /wp-admin/post-new.php1,484 ▼55418.58 ▼0.74351.56 ▼1.21111.12 ▲9.37
Media Library /wp-admin/upload.php1,777 ▲25.02 ▲0.01150.37 ▼14.75122.38 ▲10.83
Block Spammers /wp-admin/options-general.php?page=wbs-admin1,1352.3456.1489.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wbs-admin
    • > User deprecated in wp-includes/functions.php+5495
    get_option was called with an argument that is deprecated since version 5.5.0! The "blacklist_keys" option key has been renamed to "disallowed_keys".
    • > GET request to /wp-admin/options-general.php?page=wbs-admin
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wbs-admin
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/block-spammers/block-spammers.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/block-spammers/block-spammers-admin.php:385

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: blocking, spam, ip, comments

block-spammers/block-spammers.php 92% from 13 tests

The entry point to "Block Spammers" version 0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin499 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP26861394
PO File1222669
JavaScript121020
Markdown15016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin