89% wp-rest-api-customizer

Code Review | WP Rest API Customizer

WordPress plugin WP Rest API Customizer scored89%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-custo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2017
  • Latest release: Sep 21, 2022
  • Number of updates: 5
  • Update frequency: every 368.8 days
  • Top authors: ikvaesolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,159 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲2.37ms] Passed 4 tests

A check of server-side resources used by WP Rest API Customizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.46 ▼1.00
Dashboard /wp-admin3.38 ▲0.0847.93 ▼3.10
Posts /wp-admin/edit.php3.43 ▲0.0858.63 ▲11.94
Add New Post /wp-admin/post-new.php5.96 ▲0.08102.68 ▲12.35
Media Library /wp-admin/upload.php3.30 ▲0.0837.04 ▲1.63
WP Rest API Customizer /wp-admin/options-general.php?page=wp-rest-api-customizer3.2738.78

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Rest API Customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.54 ▼1.071.76 ▼0.0640.06 ▼8.55
Dashboard /wp-admin2,210 ▲224.83 ▼0.00109.52 ▼8.5143.90 ▼2.71
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0540.23 ▲0.7034.23 ▲0.15
Add New Post /wp-admin/post-new.php1,537 ▲1823.06 ▼0.16617.39 ▼48.0057.12 ▼2.18
Media Library /wp-admin/upload.php1,392 ▲74.24 ▲0.0595.77 ▼0.0842.77 ▲2.61
WP Rest API Customizer /wp-admin/options-general.php?page=wp-rest-api-customizer1,2872.1823.0738.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

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

The main file in "WP Rest API Customizer" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
127 characters long description:
Customize the WP REST API endpoints to improve your app speed and performance by adding or removing objects fron JSON response.

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
There were no executable files found in this plugin543 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP117515543

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.78
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
Namespaces0
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin