84% rest-api-meta-support

Code Review | REST API Meta Support

WordPress plugin REST API Meta Support scored84%from 54 tests.

About plugin

  • Plugin page: rest-api-meta-sup...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.4
  • WordPress version: 6.3.1
  • First release: May 26, 2020
  • Latest release: May 29, 2020
  • Number of updates: 3
  • Update frequency: every 3.3 days
  • Top authors: pericror (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /1,499 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
Install script ran successfully

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

A check of server-side resources used by REST API Meta Support
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.56 ▼1.97
Dashboard /wp-admin3.32 ▲0.0153.82 ▼23.84
Posts /wp-admin/edit.php3.37 ▲0.0149.00 ▼2.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.84 ▼13.90
Media Library /wp-admin/upload.php3.24 ▲0.0138.50 ▲0.90

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by REST API Meta Support
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.002.05 ▲0.0743.49 ▼4.58
Dashboard /wp-admin2,192 ▲155.65 ▼0.0196.47 ▲4.7745.30 ▲5.66
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0336.42 ▼0.9834.16 ▼4.51
Add New Post /wp-admin/post-new.php1,545 ▼023.23 ▲0.15672.90 ▲25.4552.78 ▲1.83
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0494.69 ▼15.0446.00 ▲3.38

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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
  • 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/rest-api-meta-support/plugin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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: plugin, meta, rest, wp-api

rest-api-meta-support/plugin.php 92% from 13 tests

The main PHP script in "REST API Meta Support" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rest-api-meta-support.php" instead of "plugin.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
Everything looks great! No dangerous files found in this plugin29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161129

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected