84% qnnp-restful-ui

Code Review | Restful UI

WordPress plugin Restful UI scored84%from 54 tests.

About plugin

  • Plugin page: qnnp-restful-ui
  • Plugin version: 2020.12.09
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Dec 10, 2020
  • Latest release: Dec 10, 2020
  • Number of updates: 22
  • Update frequency: N/A
  • Top authors: qnnp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Restful UI
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.47 ▼1.65
Dashboard /wp-admin3.32 ▲0.0245.55 ▼6.60
Posts /wp-admin/edit.php3.37 ▲0.0246.08 ▼2.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.76 ▼11.39
Media Library /wp-admin/upload.php3.24 ▲0.0134.47 ▼1.76
Restful UI /wp-admin/tools.php?page=qnnp-restful-ui3.2130.09

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Restful UI
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.43 ▼0.301.73 ▼0.2142.88 ▼2.64
Dashboard /wp-admin2,210 ▲224.85 ▼0.04108.68 ▲3.8442.14 ▲0.89
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.1639.75 ▲1.6833.95 ▼1.32
Add New Post /wp-admin/post-new.php1,545 ▲3118.54 ▲0.87610.44 ▼69.9148.41 ▼9.70
Media Library /wp-admin/upload.php1,395 ▲104.25 ▲0.0297.37 ▼2.0841.25 ▼6.15
Restful UI /wp-admin/tools.php?page=qnnp-restful-ui1,0985.11120.0973.77

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
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qnnp-restful-ui/application/menus.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qnnp-restful-ui/application/menus.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: restapi, restful, rest

qnnp-restful-ui/qnnp-restful-ui.php 85% from 13 tests

Analyzing the main PHP file in "Restful UI" version 2020.12.09
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin118 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP563369
JSON20042
JavaScript4014
CSS1002
HTML1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin