89% rest-wp

Code Review | REST WP

WordPress plugin REST WP scored89%from 54 tests.

About plugin

  • Plugin page: rest-wp
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 2, 2023
  • Latest release: Jan 2, 2023
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: rajinsharwar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /245 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.62ms] Passed 4 tests

Analyzing server-side resources used by REST WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0350.73 ▲0.20
Dashboard /wp-admin3.34 ▲0.0451.18 ▼3.21
Posts /wp-admin/edit.php3.39 ▲0.0350.01 ▼3.59
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.09 ▼7.89
Media Library /wp-admin/upload.php3.26 ▲0.0341.90 ▲7.22

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for REST WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.25 ▼1.362.13 ▲0.3444.20 ▲1.35
Dashboard /wp-admin2,218 ▲305.86 ▲0.01110.79 ▲3.9645.42 ▲3.37
Posts /wp-admin/edit.php2,101 ▲151.97 ▼0.0235.69 ▼2.9037.71 ▲4.84
Add New Post /wp-admin/post-new.php1,524 ▲517.57 ▼5.31693.74 ▲38.6055.49 ▲4.76
Media Library /wp-admin/upload.php1,400 ▲124.22 ▲0.01113.25 ▲2.3347.39 ▲2.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: wp-rest-api, api-testing, rest-api

rest-wp/rest-api-checker.php 77% from 13 tests

The main PHP file in "REST WP" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rest-wp.php" instead of "rest-api-checker.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin204 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43225204

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected