10% wp-rest-yoast-meta

Code Review | WP REST Yoast Meta

WordPress plugin WP REST Yoast Meta scored10%from 54 tests.

About plugin

  • Plugin page: wp-rest-yoast-meta
  • Plugin version: 2021.1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Mar 6, 2019
  • Latest release: Jul 7, 2021
  • Number of updates: 20
  • Update frequency: every 42.9 days
  • Top authors: acato (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /24,593 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/wp-rest-yoast-meta/includes/class-plugin.php+112
    Use of undefined constant WPSEO_VERSION - assumed 'WPSEO_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.10ms] Passed 4 tests

This is a short check of server-side resources used by WP REST Yoast Meta
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0039.03 ▼3.01
Dashboard /wp-admin3.35 ▼0.0449.64 ▼14.91
Posts /wp-admin/edit.php3.40 ▲0.0047.62 ▼2.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0084.14 ▼23.74
Media Library /wp-admin/upload.php3.27 ▲0.0037.47 ▲1.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP REST Yoast Meta
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.27 ▼0.121.88 ▲0.1345.46 ▲4.49
Dashboard /wp-admin2,198 ▲185.61 ▼0.0483.35 ▼3.2240.89 ▼3.41
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0738.86 ▲2.5031.43 ▼4.38
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▼0.04596.68 ▼111.9346.61 ▼10.64
Media Library /wp-admin/upload.php1,403 ▲34.22 ▼0.03100.91 ▼5.5442.00 ▼5.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
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
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: meta, wp-rest, json-ld, yoast, seo...

wp-rest-yoast-meta/wp-rest-yoast-meta.php Passed 13 tests

The main PHP script in "WP REST Yoast Meta" version 2021.1.2 is automatically included on every request by WordPress
45 characters long description:
Add yoast meta information to the WP REST API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin445 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8128476445

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.20
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods2268.75%
▷ Protected methods26.25%
▷ Private methods825.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin