84% be-rest-endpoints

Code Review | BE REST Endpoints

WordPress plugin BE REST Endpoints scored84%from 54 tests.

About plugin

  • Plugin page: be-rest-endpoints
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 7, 2016
  • Latest release: Feb 8, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ChopinBach (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,398 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.52MB] [CPU: ▼21.85ms] Passed 4 tests

Server-side resources used by BE REST Endpoints
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1640.31 ▼3.01
Dashboard /wp-admin3.46 ▲0.1650.10 ▼1.28
Posts /wp-admin/edit.php3.58 ▲0.2246.72 ▼14.20
Add New Post /wp-admin/post-new.php3.35 ▼2.5440.61 ▼67.40
Media Library /wp-admin/upload.php3.38 ▲0.1639.14 ▼2.78

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 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

This is an overview of browser requirements for BE REST Endpoints
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.54 ▼0.831.70 ▼0.3242.86 ▼2.82
Dashboard /wp-admin2,209 ▲215.89 ▼0.0298.93 ▼23.2941.31 ▼9.53
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0237.31 ▼5.8835.26 ▼4.75
Add New Post /wp-admin/post-new.php1,514 ▲11723.44 ▲5.87641.34 ▲10.6164.69 ▲10.19
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0697.20 ▼80.9741.91 ▼17.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/be-rest-endpoints/includes/class-be-rest-widgets-controller.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/be-rest-endpoints/includes/class-be-rest-sidebars-controller.php:16

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 96% 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: widgets, rest api widgets, sidebars, widget-areas, wp rest api widgets

be-rest-endpoints/be-rest-endpoints.php 92% from 13 tests

This is the main PHP file of "BE REST Endpoints" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 249 characters long)

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
No dangerous file extensions were detected908 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5192632815
Markdown170093

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity36.00
▷ Minimum class complexity7.00
▷ Maximum class complexity91.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods47
▷ Static methods24.26%
▷ Public methods4085.11%
▷ Protected methods00.00%
▷ Private methods714.89%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin