84% ar-subpages-widget

Code Review | AR Subpages Widget

WordPress plugin AR Subpages Widget scored 84% from 54 tests.

About plugin

  • Plugin page: ar-subpages-widget
  • Plugin version: 2.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.6
  • WordPress version: 6.3.1
  • First release: Dec 29, 2020
  • Latest release: Dec 29, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: bfouzder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,297 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by AR Subpages Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.97 ▼6.39
Dashboard /wp-admin3.32 ▲0.0144.97 ▼4.79
Posts /wp-admin/edit.php3.37 ▲0.0143.78 ▼1.75
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.00 ▼12.21
Media Library /wp-admin/upload.php3.24 ▲0.0133.67 ▼2.87

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_subpages-widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for AR Subpages Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼0.954.71 ▲2.8640.49 ▼2.85
Dashboard /wp-admin2,206 ▲145.79 ▲0.8694.28 ▼26.5640.05 ▼7.73
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0634.80 ▼1.3531.53 ▼2.61
Add New Post /wp-admin/post-new.php1,514 ▼2017.47 ▼5.88673.79 ▼9.5554.04 ▼3.09
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.06104.95 ▲9.3744.61 ▲2.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_subpages-widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ar-subpages-widget/ar-subpages-widget.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
5 plugin tags: ar_subpages, subpages, thearsoft, widget, menu

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

"AR Subpages Widget" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
55 characters long description:
Lists subpages of the current page and it's parent page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin130 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13770118
PO File15012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected