84% wp-api-yoast-meta

Code Review | WP API Yoast SEO

WordPress plugin WP API Yoast SEO scored84%from 54 tests.

About plugin

  • Plugin page: wp-api-yoast-meta
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 21, 2016
  • Latest release: Jul 29, 2016
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: ChazUK (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /5,606 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
Installer ran successfully

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

This is a short check of server-side resources used by WP API Yoast SEO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0238.48 ▼5.04
Dashboard /wp-admin3.36 ▼0.0249.59 ▼16.31
Posts /wp-admin/edit.php3.41 ▲0.0251.08 ▼4.07
Add New Post /wp-admin/post-new.php5.95 ▲0.0285.21 ▼19.22
Media Library /wp-admin/upload.php3.29 ▲0.0239.44 ▲3.49

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP API Yoast SEO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.73 ▲0.381.68 ▼0.0241.63 ▼0.34
Dashboard /wp-admin2,195 ▲215.62 ▲0.0182.74 ▼4.9037.72 ▼6.46
Posts /wp-admin/edit.php2,100 ▲31.99 ▲0.0539.86 ▲2.1834.46 ▼3.72
Add New Post /wp-admin/post-new.php1,526 ▼1023.06 ▲4.83688.24 ▼0.0159.25 ▼8.21
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.08111.78 ▲7.7348.33 ▲2.86

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-api-yoast-meta/plugin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: rest, yoast, wp-api, seo

wp-api-yoast-meta/plugin.php 92% from 13 tests

"WP API Yoast SEO" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-api-yoast-meta.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin81 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP191160
Markdown16021

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.12
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.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