64% xmlrpc-attacks-blocker

Code Review | xmlrpc attacks blocker

WordPress plugin xmlrpc attacks blocker scored64%from 54 tests.

About plugin

  • Plugin page: xmlrpc-attacks-bl...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Nov 27, 2014
  • Latest release: Nov 27, 2014
  • Number of updates: 13
  • Update frequency: every 81.5 days
  • Top authors: yehudah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /4,720 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by xmlrpc attacks blocker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.03 ▼2.72
Dashboard /wp-admin3.38 ▲0.0744.91 ▼0.44
Posts /wp-admin/edit.php3.49 ▲0.1345.57 ▼3.20
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.71 ▼19.33
Media Library /wp-admin/upload.php3.30 ▲0.0736.08 ▲2.52

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification found: 1 file (0.60KB) outside of "wp-content/plugins/xmlrpc-attacks-blocker/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
axab_options
axab_errors
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for xmlrpc attacks blocker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.19 ▼1.191.62 ▲0.0943.11 ▲2.29
Dashboard /wp-admin2,232 ▲475.89 ▲0.0897.69 ▼3.7440.30 ▲0.76
Posts /wp-admin/edit.php2,118 ▲322.09 ▲0.0840.44 ▲5.3435.31 ▼2.38
Add New Post /wp-admin/post-new.php1,537 ▲1623.05 ▼0.24660.01 ▲0.8651.34 ▼4.69
Media Library /wp-admin/upload.php1,414 ▲294.28 ▲0.05107.12 ▲7.3145.96 ▲3.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/xmlrpc-attacks-blocker/uninstall.php+6
    Uncaught Error: Using $this when not in object context in wp-content/plugins/xmlrpc-attacks-blocker/uninstall.php:6
    Stack trace:
    #0 wp-admin/includes/plugin.php(1245): include_once()
    #1 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • Incomplete uninstall procedure, leaving 9 files (0.05MB) in the plugin directory
    • (new file) css/style.css
    • (new file) css/chosen-sprite.png
    • (new file) plugin.php
    • (new file) css/chosen-sprite@2x.png
    • (new file) js/script.js
    • (new file) js/chosen.jquery.min.js
    • (new file) readme.txt
    • (new file) css/chosen.min.css
    • (new file) uninstall.php
  • Zombie WordPress options detected upon uninstall: 9 options
    • axab_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • axab_errors
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/xmlrpc-attacks-blocker/plugin.php:29
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/xmlrpc-attacks-blocker/plugin.php on line 28
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/file.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/xmlrpc-attacks-blocker/plugin.php on line 28
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xmlrpc-attacks-blocker/plugin.php on line 28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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: attack, hack, xmlrpc, block

xmlrpc-attacks-blocker/plugin.php 92% from 13 tests

The main file in "xmlrpc attacks blocker" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("xmlrpc-attacks-blocker.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin319 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP26413305
CSS23110
JavaScript2014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/chosen-sprite@2x.png0.72KB0.83KB0.00%
css/chosen-sprite.png0.53KB0.88KB0.00%