89% smntcs-disable-rest-api-user-endpoints

Code Review | SMNTCS Disable REST API User Endpoints

WordPress plugin SMNTCS Disable REST API User Endpoints scored89%from 54 tests.

About plugin

  • Plugin page: smntcs-disable-re...
  • Plugin version: 2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Dec 24, 2016
  • Latest release: Oct 15, 2023
  • Number of updates: 22
  • Update frequency: every 113.0 days
  • Top authors: nielslange (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /14,202 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.76ms] Passed 4 tests

This is a short check of server-side resources used by SMNTCS Disable REST API User Endpoints
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.23 ▼3.18
Dashboard /wp-admin3.31 ▼0.0446.60 ▼16.48
Posts /wp-admin/edit.php3.36 ▲0.0044.89 ▼0.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.30 ▼22.99
Media Library /wp-admin/upload.php3.23 ▲0.0033.14 ▼0.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SMNTCS Disable REST API User Endpoints
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.32 ▲0.041.82 ▲0.1743.95 ▼1.39
Dashboard /wp-admin2,195 ▲215.54 ▼0.0686.28 ▼0.1240.00 ▼1.71
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0135.50 ▼0.1834.23 ▲0.91
Add New Post /wp-admin/post-new.php1,526 ▼223.49 ▲0.32659.50 ▼17.5955.13 ▲2.86
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.0298.26 ▼4.9943.15 ▼2.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
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 a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: endpoints, rest api, security

smntcs-disable-rest-api-user-endpoints/smntcs-disable-rest-api-endpoints.php 85% from 13 tests

This is the main PHP file of "SMNTCS Disable REST API User Endpoints" version 2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("smntcs-disable-rest-api-user-endpoints.php" instead of "smntcs-disable-rest-api-endpoints.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin9,278 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
There were not PNG files found in your plugin