89% wp-rest-api-user-meta

Code Review | WP REST API - User Meta

WordPress plugin WP REST API - User Meta scored89%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-user-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Jun 23, 2020
  • Number of updates: 6
  • Update frequency: every 195.2 days
  • Top authors: ruhul105 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /1,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by WP REST API - User Meta
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.39 ▼2.91
Dashboard /wp-admin3.31 ▲0.0050.24 ▼2.32
Posts /wp-admin/edit.php3.36 ▲0.0050.58 ▲0.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.38 ▲0.07
Media Library /wp-admin/upload.php3.23 ▲0.0038.29 ▲2.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP REST API - User Meta
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.381.65 ▼0.2944.88 ▲0.41
Dashboard /wp-admin2,195 ▲185.63 ▲0.0991.34 ▲1.4841.04 ▲0.02
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0539.17 ▲1.1635.43 ▲0.54
Add New Post /wp-admin/post-new.php1,526 ▼1122.16 ▲3.66683.07 ▲48.6950.80 ▼19.65
Media Library /wp-admin/upload.php1,400 ▲64.23 ▲0.0593.48 ▼5.8946.75 ▲3.64

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
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 just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-rest-api-user-meta === )
The official readme.txt might help

wp-rest-api-user-meta/wp_rest_api_usermeta.php 85% from 13 tests

This is the main PHP file of "WP REST API - User Meta" version 1.0.0, 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:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-rest-api-user-meta.php" instead of "wp_rest_api_usermeta.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112826

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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 files were detected