90% wp-rest-api-security

Code Review | WP REST API Security

WordPress plugin WP REST API Security scored90%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-security
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.1
  • WordPress version: 6.3.1
  • First release: Mar 5, 2019
  • Latest release: Aug 12, 2019
  • Number of updates: 5
  • Update frequency: every 32.0 days
  • Top authors: invisnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.97ms] Passed 4 tests

Analyzing server-side resources used by WP REST API Security
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.82 ▼4.14
Dashboard /wp-admin3.37 ▲0.0645.39 ▼2.33
Posts /wp-admin/edit.php3.42 ▲0.0647.02 ▲1.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.34 ▼0.23
Media Library /wp-admin/upload.php3.29 ▲0.0636.00 ▼1.16
REST API Security /wp-admin/options-general.php?page=wp-rest-api-security4.7836.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP REST API Security
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.19 ▼1.231.71 ▼0.1242.81 ▼4.63
Dashboard /wp-admin2,211 ▲255.83 ▲0.95102.30 ▼20.5739.84 ▼6.86
Posts /wp-admin/edit.php2,097 ▲82.02 ▲0.0339.91 ▲2.2635.58 ▲2.97
Add New Post /wp-admin/post-new.php1,530 ▲1618.07 ▲0.44654.99 ▼34.2753.57 ▼7.70
Media Library /wp-admin/upload.php1,396 ▲84.15 ▼0.0297.31 ▼1.0141.84 ▲0.55
REST API Security /wp-admin/options-general.php?page=wp-rest-api-security2,3542.0233.0540.85

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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: security, rest, api

wp-rest-api-security/wp-rest-api-security.php Passed 13 tests

The entry point to "WP REST API Security" version 1.1.2 is a PHP file that has certain tags in its header comment area
50 characters long description:
A UI to choose which REST API endpoints to enable.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin302 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13098259
CSS10027
JavaScript11016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin