84% be-subpages-widget

Code Review | BE Subpages Widget

WordPress plugin BE Subpages Widget scored84%from 54 tests.

About plugin

  • Plugin page: be-subpages-widget
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Nov 10, 2011
  • Latest release: Aug 19, 2020
  • Number of updates: 36
  • Update frequency: every 89.0 days
  • Top authors: billerickson (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

6,000+ active /66,869 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.01ms] Passed 4 tests

This is a short check of server-side resources used by BE Subpages Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.49 ▼1.89
Dashboard /wp-admin3.32 ▼0.0346.71 ▼18.41
Posts /wp-admin/edit.php3.37 ▲0.0145.15 ▼8.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.39 ▼15.26
Media Library /wp-admin/upload.php3.24 ▲0.0136.48 ▲1.98

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for BE Subpages Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.121.75 ▼0.1546.01 ▲3.87
Dashboard /wp-admin2,209 ▲215.85 ▲0.0198.19 ▼18.8437.94 ▼4.80
Posts /wp-admin/edit.php2,089 ▼62.05 ▲0.0536.71 ▼0.6132.55 ▼0.09
Add New Post /wp-admin/post-new.php1,535 ▲2123.21 ▲5.66604.93 ▼77.9560.43 ▼0.95
Media Library /wp-admin/upload.php1,382 ▼94.21 ▲0.0195.66 ▼17.5041.57 ▼5.91

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_subpages-widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/be-subpages-widget/be-subpages-widget.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: subpages, widget, menu

be-subpages-widget/be-subpages-widget.php Passed 13 tests

The main PHP file in "BE Subpages Widget" ver. 1.7 adds more information about the plugin and also serves as the entry point for this plugin
37 characters long description:
Lists subpages of the current section

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected157 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13768118
PO File2121239

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin