84% disable-permanently-rest-api

Code Review | Disable Permanently REST API

WordPress plugin Disable Permanently REST API scored84%from 54 tests.

About plugin

  • Plugin page: disable-permanent...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Jul 9, 2017
  • Latest release: Oct 20, 2018
  • Number of updates: 7
  • Update frequency: every 66.9 days
  • Top authors: parallelit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /857 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.85ms] Passed 4 tests

Server-side resources used by Disable Permanently REST API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.60 ▼13.53
Dashboard /wp-admin3.31 ▲0.0149.56 ▼6.07
Posts /wp-admin/edit.php3.36 ▲0.0048.70 ▼1.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.78 ▼1.84
Media Library /wp-admin/upload.php3.23 ▲0.0035.87 ▲1.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Disable Permanently REST API
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▲0.101.69 ▼0.1641.71 ▼4.16
Dashboard /wp-admin2,198 ▲185.54 ▼0.0485.01 ▼12.7438.24 ▼8.60
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0539.39 ▲0.3136.39 ▲0.66
Add New Post /wp-admin/post-new.php1,531 ▲221.83 ▼1.29668.75 ▼38.2049.42 ▼10.07
Media Library /wp-admin/upload.php1,397 ▼34.12 ▼0.12101.36 ▼4.1442.35 ▼3.98

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-permanently-rest-api/disable-permanently-rest-api.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: rest, json, wp-json, rest api, disable

disable-permanently-rest-api/disable-permanently-rest-api.php Passed 13 tests

Analyzing the main PHP file in "Disable Permanently REST API" version 0.1.1
72 characters long description:
The most simple plugin to disable permanently REST API on WordPress 4.7+

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin21 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12812
Markdown1509

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin