89% wp-extended-data-to-rest-api

Code Review | WP Extended Data to REST API

WordPress plugin WP Extended Data to REST API scored89%from 54 tests.

About plugin

  • Plugin page: wp-extended-data-...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 13, 2020
  • Latest release: Feb 17, 2020
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: giuscia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.58ms] Passed 4 tests

A check of server-side resources used by WP Extended Data to REST API
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.76 ▼4.20
Dashboard /wp-admin3.32 ▲0.0244.06 ▼7.15
Posts /wp-admin/edit.php3.37 ▲0.0246.54 ▼2.57
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.09 ▼0.38
Media Library /wp-admin/upload.php3.24 ▲0.0236.16 ▲3.30
WP Extended Data to REST API /wp-admin/options-general.php?page=wp-extended-data-to-rest-api3.2130.32

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-comments
wpedtra-p2p
wpedtra-pt-post
wpedtra-children_ids
can_compress_scripts
wpedtra-terms
db_upgraded
wpedtra-meta
widget_theysaidso_widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Extended Data to REST API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.60 ▼0.981.67 ▼0.6438.77 ▼10.32
Dashboard /wp-admin2,210 ▲284.86 ▼0.96110.00 ▲0.7841.57 ▼3.97
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0039.79 ▲3.8134.58 ▲0.95
Add New Post /wp-admin/post-new.php1,536 ▼623.27 ▲4.97654.53 ▲35.3157.32 ▲7.37
Media Library /wp-admin/upload.php1,392 ▲14.18 ▼0.0294.30 ▼1.5043.53 ▼2.10
WP Extended Data to REST API /wp-admin/options-general.php?page=wp-extended-data-to-rest-api8832.0324.0732.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 12 options
    • theysaidso_admin_options
    • wpedtra-meta
    • wpedtra-pt-post
    • widget_recent-posts
    • wpedtra-children_ids
    • db_upgraded
    • wpedtra-p2p
    • wpedtra-pt-page
    • widget_recent-comments
    • widget_theysaidso_widget
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Everything seems fine, however this is by no means an exhaustive test

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: No valid plugin tags found
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

wp-extended-data-to-rest-api/wp-extended-data-to-rest-api.php Passed 13 tests

This is the main PHP file of "WP Extended Data to REST API" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
71 characters long description:
Exposes Extended Data (meta, terms, p2p, ...) in the WordPress REST API

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
No dangerous file extensions were detected496 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
Markdown1800320
PHP37413176

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.00
▷ Minimum class complexity3.00
▷ Maximum class complexity17.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants1
▷ Global constants1100.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