83% dd-flexible-sidebars

Code Review | DD - Flexible Sidebars

WordPress plugin DD - Flexible Sidebars scored83%from 54 tests.

About plugin

  • Plugin page: dd-flexible-sidebars
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.4.0
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Nov 25, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: deh3nne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,061 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.58ms] Passed 4 tests

A check of server-side resources used by DD - Flexible Sidebars
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.18 ▲2.36
Dashboard /wp-admin3.37 ▲0.0752.68 ▼1.62
Posts /wp-admin/edit.php3.49 ▲0.1350.81 ▲0.62
Add New Post /wp-admin/post-new.php5.95 ▲0.07105.34 ▲9.67
Media Library /wp-admin/upload.php3.29 ▲0.0737.20 ▲0.95

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DD - Flexible Sidebars
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.031.82 ▲0.1740.37 ▼4.28
Dashboard /wp-admin2,195 ▲155.62 ▲0.0196.49 ▲3.0441.52 ▼5.32
Posts /wp-admin/edit.php2,100 ▲31.98 ▲0.0138.89 ▼1.8234.71 ▼5.15
Add New Post /wp-admin/post-new.php6,279 ▲4,75326.19 ▲2.67839.57 ▲176.8555.22 ▲1.16
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0699.55 ▼4.0643.11 ▼1.94

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dd-flexible-sidebars/ddflexsidebars.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dd-flexible-sidebars/views/meta-box-sidebar-select.php:3

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === dd-flexible-sidebars === )
The official readme.txt is a good inspiration

dd-flexible-sidebars/ddflexsidebars.php 85% from 13 tests

This is the main PHP file of "DD - Flexible Sidebars" 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
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dd-flexible-sidebars.php" instead of "ddflexsidebars.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin384 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP389199324
PO File1204660

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity24.50
▷ Minimum class complexity14.00
▷ Maximum class complexity35.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1666.67%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin