78% custom-sidebar-links

Code Review | Custom Sidebar Links

WordPress plugin Custom Sidebar Links scored 78% from 54 tests.

About plugin

  • Plugin page: custom-sidebar-links
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 5.8.1
  • First release: Jan 12, 2016
  • Latest release: Jan 13, 2016
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: vimodesigns (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,003 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼142.03ms] Passed 4 tests

This is a short check of server-side resources used by Custom Sidebar Links
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0735.51 ▲1.87
Dashboard /wp-admin3.13 ▲0.0846.20 ▼2.73
Posts /wp-admin/edit.php3.18 ▲0.0845.75 ▲1.77
Add New Post /wp-admin/post-new.php5.49 ▲0.0692.89 ▼567.58
Media Library /wp-admin/upload.php3.07 ▲0.0733.85 ▲0.43
Custom Sidebar Links /wp-admin/options-general.php?page=custom_sidebar_links3.0429.01

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
widget_vimo_csbl_list_pages_widget

Browser metrics Passed 4 tests

Checking browser requirements for Custom Sidebar Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11315.85 ▲0.1615.43 ▲5.7546.47 ▼0.95
Dashboard /wp-admin2,975 ▲445.87 ▼0.25152.28 ▼0.35114.96 ▲3.91
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0281.94 ▲10.7485.09 ▼5.43
Add New Post /wp-admin/post-new.php1,607 ▼7618.77 ▼0.04390.81 ▼1.75105.25 ▼2.87
Media Library /wp-admin/upload.php1,812 ▲55.05 ▲0.05161.08 ▼6.67113.52 ▲1.67
Custom Sidebar Links /wp-admin/options-general.php?page=custom_sidebar_links1,0472.1052.3169.21

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_vimo_csbl_list_pages_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/custom-sidebar-links/index.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-sidebar-links/admin/metabox.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-sidebar-links/admin/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
6 plugin tags: links, custom sidebar, sidebar widget, links widget, side bar...

custom-sidebar-links/index.php 92% from 13 tests

The main PHP file in "Custom Sidebar Links" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-sidebar-links.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected322 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP315540322

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected