90% custom-rest-api-prefix

Code Review | Custom REST API Prefix

WordPress plugin Custom REST API Prefix scored90%from 54 tests.

About plugin

  • Plugin page: custom-rest-api-p...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.0
  • WordPress version: 6.3.1
  • First release: Sep 22, 2022
  • Latest release: Oct 11, 2022
  • Number of updates: 3
  • Update frequency: every 6.3 days
  • Top authors: alvindcaesar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.50ms] Passed 4 tests

An overview of server-side resources used by Custom REST API Prefix
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.00 ▼2.97
Dashboard /wp-admin3.32 ▲0.0254.26 ▼0.06
Posts /wp-admin/edit.php3.37 ▲0.0246.56 ▼0.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.89 ▼10.62
Media Library /wp-admin/upload.php3.25 ▲0.0234.90 ▲0.42

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Custom REST API Prefix
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.241.65 ▲0.1836.77 ▼3.40
Dashboard /wp-admin2,198 ▲215.57 ▼0.0981.69 ▼16.9738.36 ▼7.04
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0534.27 ▲0.6432.54 ▼1.98
Add New Post /wp-admin/post-new.php1,526 ▼023.79 ▲0.21690.64 ▲26.9060.77 ▲7.02
Media Library /wp-admin/upload.php1,403 ▼04.21 ▼0.0096.03 ▼7.2142.73 ▼3.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected 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
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: wp-rest-api, rest-api

custom-rest-api-prefix/custom-rest-api-prefix.php 92% from 13 tests

"Custom REST API Prefix" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
Success! There were no dangerous files found in this plugin60 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2184060

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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
PNG images were not found in this plugin