78% ultimate-wp-rest

Code Review | Ultimate WP REST API

WordPress plugin Ultimate WP REST API scored 78% from 54 tests.

About plugin

  • Plugin page: ultimate-wp-rest
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 15, 2018
  • Latest release: Dec 21, 2018
  • Number of updates: 12
  • Update frequency: every 10.8 days
  • Top authors: egany (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active / 3,440 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.24MB] [CPU: ▼0.18ms] Passed 4 tests

A check of server-side resources used by Ultimate WP REST API
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2139.61 ▼3.42
Dashboard /wp-admin3.55 ▲0.2546.69 ▲0.62
Posts /wp-admin/edit.php3.60 ▲0.2452.38 ▲6.47
Add New Post /wp-admin/post-new.php6.17 ▲0.2897.16 ▼4.40
Media Library /wp-admin/upload.php3.47 ▲0.2442.48 ▲7.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 218 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate WP REST API
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17914.03 ▼0.346.29 ▲4.6438.19 ▼7.38
Dashboard /wp-admin2,229 ▲445.91 ▲0.83112.26 ▼2.9442.47 ▼5.22
Posts /wp-admin/edit.php2,112 ▲232.01 ▲0.0140.35 ▲2.6536.32 ▲6.65
Add New Post /wp-admin/post-new.php1,547 ▲2723.24 ▲0.06661.47 ▲30.1254.03 ▼0.49
Media Library /wp-admin/upload.php1,411 ▲234.22 ▼0.0497.29 ▼6.4443.77 ▲0.65

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • UTM_WP_REST_AUTH_MODE
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 12× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/ultimate-wp-rest/includes/rest-api/rest-api-users.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-module-setting.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-module-render.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-core.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-module-admin.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-module-tool.php
    • > /wp-content/plugins/ultimate-wp-rest/ultimate_wp_rest.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-module-control.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-module-rest-api.php
    • > /wp-content/plugins/ultimate-wp-rest/includes/plugin-module-cache.php
  • 70× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Trait 'Nette\\SmartObject' not found in wp-content/plugins/ultimate-wp-rest/vendor/nette/utils/src/Utils/DateTime.php on line 16
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Signer' not found in wp-content/plugins/ultimate-wp-rest/vendor/lcobucci/jwt/src/Signer/BaseSigner.php:19
    • > PHP Fatal error
      Trait 'Nette\\SmartObject' not found in wp-content/plugins/ultimate-wp-rest/vendor/nette/caching/src/Caching/OutputHelper.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Rsa' not found in wp-content/plugins/ultimate-wp-rest/vendor/lcobucci/jwt/src/Signer/Rsa/Sha384.php:18
    • > PHP Fatal error
      Trait 'Nette\\SmartObject' not found in wp-content/plugins/ultimate-wp-rest/vendor/nette/caching/src/Caching/Cache.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Latte\\Macros\\MacroSet' not found in wp-content/plugins/ultimate-wp-rest/vendor/latte/latte/src/Latte/Macros/BlockMacros.php:21
    • > PHP Fatal error
      Trait 'Nette\\SmartObject' not found in wp-content/plugins/ultimate-wp-rest/vendor/nette/utils/src/Iterators/CachingIterator.php on line 25
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Ecdsa' not found in wp-content/plugins/ultimate-wp-rest/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Nette\\Caching\\IStorage' not found in wp-content/plugins/ultimate-wp-rest/vendor/nette/caching/src/Caching/Storages/DevNullStorage.php:16
    • > PHP Fatal error
      Trait 'Nette\\StaticClass' not found in wp-content/plugins/ultimate-wp-rest/vendor/nette/utils/src/Utils/ObjectMixin.php on line 18

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 90% from 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
5 plugin tags: wordpress, rest api, mobile app, menus api, jwt

ultimate-wp-rest/ultimate_wp_rest.php 77% from 13 tests

Analyzing the main PHP file in "Ultimate WP REST API" version 1.2.7
The following require your attention:
  • 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: The description should be shorter than 140 characters (currently 151 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("ultimate-wp-rest.php" instead of "ultimate_wp_rest.php")

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
Good job! No executable or dangerous file extensions detected18,473 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1523,7285,72314,492
JavaScript10239841,246
Markdown1047801,028
CSS720632887
JSON800690
YAML39399
XML12031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity19.05
▷ Minimum class complexity1.00
▷ Maximum class complexity167.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces22
Interfaces14
Traits3
Classes130
▷ Abstract classes53.85%
▷ Concrete classes12596.15%
▷ Final classes21.60%
Methods1,022
▷ Static methods28427.79%
▷ Public methods90388.36%
▷ Protected methods232.25%
▷ Private methods969.39%
Functions78
▷ Named functions56.41%
▷ Anonymous functions7393.59%
Constants68
▷ Global constants2435.29%
▷ Class constants4464.71%
▷ Public constants44100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin