79% filter-wp-api

Code Review | Filter WP Api

WordPress plugin Filter WP Api scored79%from 54 tests.

About plugin

  • Plugin page: filter-wp-api
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 6.3.1
  • First release: Sep 30, 2017
  • Latest release: Oct 21, 2017
  • Number of updates: 9
  • Update frequency: every 2.9 days
  • Top authors: ogulcan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /755 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.55ms] Passed 4 tests

Analyzing server-side resources used by Filter WP Api
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.28 ▲0.08
Dashboard /wp-admin3.33 ▲0.0349.78 ▼3.26
Posts /wp-admin/edit.php3.38 ▲0.0347.90 ▼2.48
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.11 ▼12.53
Media Library /wp-admin/upload.php3.26 ▲0.0336.39 ▲0.47
Filter Rest API /wp-admin/options-general.php?page=filter-wp-api3.2640.71

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Filter WP Api: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.011.93 ▲0.2244.05 ▲0.84
Dashboard /wp-admin2,202 ▲225.62 ▼0.0591.20 ▲0.2741.36 ▼7.61
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0237.97 ▼0.6035.22 ▼3.04
Add New Post /wp-admin/post-new.php1,531 ▲323.03 ▼0.15681.74 ▲38.8059.05 ▲8.17
Media Library /wp-admin/upload.php1,404 ▲44.23 ▼0.16110.52 ▲1.4848.93 ▲2.98
Filter Rest API /wp-admin/options-general.php?page=filter-wp-api9362.0025.1727.80

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=filter-wp-api
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=filter-wp-api
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flush_rewrite_rules() in wp-content/plugins/filter-wp-api/admin/partials/filter-wp-api-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Filter_WP_Api_Admin' not found in wp-content/plugins/filter-wp-api/admin/settings/class-filter-wp-api-settings.php:9

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: wp-json, api, filter

filter-wp-api/filter-wp-api.php Passed 13 tests

The main PHP script in "Filter WP Api" version 1.1.0 is automatically included on every request by WordPress
58 characters long description:
A wordpress plugin that clears huge fields of WP Rest API.

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 plugin414 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9140495408
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods3188.57%
▷ Protected methods00.00%
▷ Private methods411.43%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin