84% import-export-with-custom-rest-api

Code Review | REST API | Custom API Generator For Cross Platform And Import Export In WP

WordPress plugin REST API | Custom API Generator For Cross Platform And Import Export In WP scored84%from 54 tests.

About plugin

  • Plugin page: import-export-wit...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 10, 2022
  • Latest release: Jun 1, 2022
  • Number of updates: 33
  • Update frequency: every 0.7 days
  • Top authors: weboccults (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by REST API | Custom API Generator For Cross Platform And Import Export In WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.47 ▼2.52
Dashboard /wp-admin3.33 ▲0.0348.48 ▼0.49
Posts /wp-admin/edit.php3.44 ▲0.0944.64 ▼0.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.18 ▼11.19
Media Library /wp-admin/upload.php3.25 ▲0.0334.96 ▼2.40
Export settings /wp-admin/admin.php?page=rapi-settings3.2931.05
Import settings /wp-admin/admin.php?page=import-settings3.2531.28
Check API /wp-admin/admin.php?page=show-all-api3.2730.61

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, 6 new options
New tables
wot_rapi_settings
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by REST API | Custom API Generator For Cross Platform And Import Export In WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.24 ▼1.024.49 ▲2.3142.07 ▲0.02
Dashboard /wp-admin2,244 ▲564.87 ▼1.09102.06 ▼14.9540.63 ▼3.15
Posts /wp-admin/edit.php2,121 ▲322.05 ▲0.0236.36 ▼1.2033.45 ▼2.69
Add New Post /wp-admin/post-new.php1,552 ▲1718.13 ▼4.96606.25 ▼68.3473.34 ▲8.78
Media Library /wp-admin/upload.php1,417 ▲294.22 ▲0.04100.59 ▼0.8143.71 ▲2.54
Export settings /wp-admin/admin.php?page=rapi-settings1,2311.7325.5833.06
Import settings /wp-admin/admin.php?page=import-settings8152.0524.1030.29
Check API /wp-admin/admin.php?page=show-all-api8082.0828.2827.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/import-export-with-custom-rest-api/backend/wp-background-processing-master/classes/wp-background-process.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/import-export-with-custom-rest-api/backend/wp-background-processing-master/wp-background-processing.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

import-export-with-custom-rest-api/import-export-with-custom-rest-api.php 92% from 13 tests

The entry point to "REST API | Custom API Generator For Cross Platform And Import Export In WP" version 2.0.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 74 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,940 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP214089131,722
Markdown1600112
CSS11149
JavaScript16031
JSON20026

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods81
▷ Static methods1822.22%
▷ Public methods5770.37%
▷ Protected methods2227.16%
▷ Private methods22.47%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants6
▷ Global constants6100.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