84% wpsso-rest-api

Code Review | WPSSO REST API

WordPress plugin WPSSO REST API scored84%from 54 tests.

About plugin

  • Plugin page: wpsso-rest-api
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2018
  • Latest release: Nov 9, 2023
  • Number of updates: 1,120
  • Update frequency: every 1.8 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /13,912 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.10MB] [CPU: ▼1.29ms] Passed 4 tests

A check of server-side resources used by WPSSO REST API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.48 ▲1.73
Dashboard /wp-admin3.40 ▲0.1049.25 ▼0.40
Posts /wp-admin/edit.php3.51 ▲0.1647.40 ▼0.63
Add New Post /wp-admin/post-new.php5.98 ▲0.1094.85 ▼1.60
Media Library /wp-admin/upload.php3.32 ▲0.0932.06 ▼2.51

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPSSO REST API
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.23 ▼0.482.08 ▲0.2343.93 ▼4.57
Dashboard /wp-admin2,204 ▲305.62 ▲0.0083.58 ▼17.3741.99 ▼5.92
Posts /wp-admin/edit.php2,106 ▲62.00 ▲0.0437.26 ▲0.0436.06 ▲1.88
Add New Post /wp-admin/post-new.php1,541 ▲1524.97 ▲1.46611.25 ▼36.7469.01 ▲2.00
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.0398.21 ▼1.2343.54 ▲0.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wpsso-rest-api/lib/register.php
    • > /wp-content/plugins/wpsso-rest-api/lib/filters.php
    • > /wp-content/plugins/wpsso-rest-api/lib/abstract/com/add-on.php
    • > /wp-content/plugins/wpsso-rest-api/wpsso-rest-api.php
    • > /wp-content/plugins/wpsso-rest-api/gettext/gettext-lib-config.php
    • > /wp-content/plugins/wpsso-rest-api/lib/config.php
    • > /wp-content/plugins/wpsso-rest-api/lib/abstract/add-on.php
    • > /wp-content/plugins/wpsso-rest-api/gettext/gettext-lib-abstract-com.php

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: rest api, api, meta tags, markup, rest...

wpsso-rest-api/wpsso-rest-api.php Passed 13 tests

This is the main PHP file of "WPSSO REST API" version 3.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
119 characters long description:
Extends the WordPress REST API post, term, and user query results with an array of meta tags and Schema JSON-LD markup.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin591 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8279151493
PO File1101038
HTML232030
Markdown113030

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.33
▷ Minimum class complexity4.00
▷ Maximum class complexity31.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods38
▷ Static methods821.05%
▷ Public methods2976.32%
▷ Protected methods410.53%
▷ Private methods513.16%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-128x128.png19.89KB8.34KB▼ 58.10%
images/icon-256x256.png50.22KB21.98KB▼ 56.23%