84% disable-xml-rpc-api

Code Review | Disable XML-RPC-API

WordPress plugin Disable XML-RPC-API scored 84% from 54 tests.

About plugin

  • Plugin page: disable-xml-rpc-api
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2020
  • Latest release: Aug 14, 2023
  • Number of updates: 69
  • Update frequency: every 15.2 days
  • Top authors: aminnz (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

80,000+ active / 466,588 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.14MB] [CPU: ▲4.61ms] Passed 4 tests

Analyzing server-side resources used by Disable XML-RPC-API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1347.43 ▲7.30
Dashboard /wp-admin4.44 ▲1.1452.90 ▲4.55
Posts /wp-admin/edit.php4.55 ▲1.2055.52 ▲9.57
Add New Post /wp-admin/post-new.php7.04 ▲1.15102.25 ▼2.99
Media Library /wp-admin/upload.php4.36 ▲1.1346.92 ▲10.06

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

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • The plugin illegally modified 1 file (0.85KB) outside of "wp-content/plugins/disable-xml-rpc-api/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 117 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
dsxmlrpc-settings
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Disable XML-RPC-API
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.35 ▼1.231.44 ▼0.1840.10 ▼3.06
Dashboard /wp-admin2,243 ▲585.90 ▲0.0298.57 ▼17.6340.36 ▼3.72
Posts /wp-admin/edit.php2,129 ▲402.03 ▼0.0139.04 ▲4.8035.40 ▲4.14
Add New Post /wp-admin/post-new.php1,567 ▲3418.52 ▼4.65680.10 ▼2.4161.77 ▲6.04
Media Library /wp-admin/upload.php1,428 ▲374.24 ▲0.0294.49 ▼7.8041.61 ▼3.01
Security Settings /wp-admin/admin.php?page=Security Settings#tab=security-settings1,5783.4956.0147.33
Speed Up WordPress /wp-admin/admin.php?page=Security Settings#tab=speed-up-wordpress1,5803.4050.8435.54
Backup/Restore Settings /wp-admin/admin.php?page=Security Settings#tab=backup-restore-settings1,5733.6648.3533.38
XML-RPC Settings /wp-admin/admin.php?page=Security Settings#tab=xml-rpc-settings1,5783.6448.8137.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/disable-xml-rpc-api/admin/admin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

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

disable-xml-rpc-api/disable-xml-rpc-api.php Passed 13 tests

The principal PHP file in "Disable XML-RPC-API" v. 2.1.5 is loaded by WordPress automatically on each request
102 characters long description:
Lightweight plugin to disable XML-RPC API and Pingbacks,Trackbacks for faster and more secure website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin12,187 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PO File203,0373,4146,180
PHP641,7899735,906
JavaScript4291199
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity21.13
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods203
▷ Static methods3416.75%
▷ Public methods203100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions2492.31%
▷ Anonymous functions27.69%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/logo-icon.png3.11KB1.53KB▼ 50.66%
lib/skelet/assets/images/checkerboard.png2.29KB2.54KB0.00%