84% smk-sidebar-generator

Code Review | SMK Sidebar Generator

WordPress plugin SMK Sidebar Generator scored84%from 54 tests.

About plugin

  • Plugin page: smk-sidebar-gener...
  • Plugin version: 3.5.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 4, 2014
  • Latest release: Nov 18, 2023
  • Number of updates: 52
  • Update frequency: every 69.3 days
  • Top authors: _smartik_ (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20,000+ active /379,785 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.98ms] Passed 4 tests

A check of server-side resources used by SMK Sidebar Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0433.50 ▼5.44
Dashboard /wp-admin3.33 ▲0.0345.58 ▼1.99
Posts /wp-admin/edit.php3.45 ▲0.0950.25 ▼0.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.82 ▼12.15
Media Library /wp-admin/upload.php3.26 ▲0.0334.27 ▲0.43
Sidebar Generator /wp-admin/themes.php?page=smk_sidebar_generator3.2432.25

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
smk_sidebar_generator

Browser metrics Passed 4 tests

Checking browser requirements for SMK Sidebar Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.24 ▲0.001.70 ▼0.0337.80 ▼7.04
Dashboard /wp-admin2,202 ▲285.64 ▼0.0785.72 ▼8.6839.77 ▼3.25
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0335.68 ▼7.1432.88 ▼2.44
Add New Post /wp-admin/post-new.php1,534 ▼223.21 ▲0.26637.60 ▲11.7361.02 ▲2.90
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.0596.80 ▼2.4341.48 ▼1.14
Sidebar Generator /wp-admin/themes.php?page=smk_sidebar_generator9921.9528.6030.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • smk_sidebar_generator
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Smk_Sidebar_Generator_Condition' not found in wp-content/plugins/smk-sidebar-generator/condition-cpt.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
5 plugin tags: custom, generator, widget, sidebar, unlimited

smk-sidebar-generator/smk-sidebar-generator.php 92% from 13 tests

This is the main PHP file of "SMK Sidebar Generator" version 3.5.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6" instead of "5.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,382 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP7170475846
JavaScript15331228
CSS1945218
PO File1272783
Markdown1207

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity21.71
▷ Minimum class complexity3.00
▷ Maximum class complexity40.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes228.57%
▷ Concrete classes571.43%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods5491.53%
▷ Protected methods58.47%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
PNG images were not found in this plugin