78% widgetize-pages-light

Code Review | Widgetize Pages Light

WordPress plugin Widgetize Pages Light scored78%from 54 tests.

About plugin

  • Plugin page: widgetize-pages-l...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 6.3.1
  • First release: Aug 20, 2012
  • Latest release: May 7, 2022
  • Number of updates: 97
  • Update frequency: every 36.6 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

5,000+ active /252,094 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.17MB] [CPU: ▲4.31ms] Passed 4 tests

A check of server-side resources used by Widgetize Pages Light
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.62 ▲1.1648.15 ▲7.01
Dashboard /wp-admin4.48 ▲1.1455.85 ▲0.47
Posts /wp-admin/edit.php4.60 ▲1.2463.36 ▲16.87
Add New Post /wp-admin/post-new.php7.09 ▲1.2197.68 ▼5.31
Media Library /wp-admin/upload.php4.42 ▲1.2049.43 ▲15.06
Plugin Options /wp-admin/admin.php?page=otw-wpl-options4.3843.89
Manage widget /wp-admin/admin.php?page=otw-wpl-action4.3842.13
Sidebars /wp-admin/admin.php?page=otw-wpl4.4243.15
otwfcr /wp-admin/admin.php?page=otwfcr4.3841.70
Add Sidebar /wp-admin/admin.php?page=otw-wpl-add4.4144.92
License Manager /wp-admin/admin.php?page=otw-wpl-lm4.44256.56

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 135 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
otw_widget_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Widgetize Pages Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.39 ▲0.101.80 ▲0.2940.07 ▼1.02
Dashboard /wp-admin2,232 ▲555.82 ▲0.1895.65 ▲4.6475.49 ▲37.50
Posts /wp-admin/edit.php2,158 ▲612.29 ▲0.2736.76 ▲0.3231.61 ▼3.23
Add New Post /wp-admin/post-new.php6,459 ▲4,93328.05 ▲4.99948.82 ▲287.4453.76 ▲2.26
Media Library /wp-admin/upload.php1,452 ▲584.50 ▲0.3394.53 ▼7.2771.77 ▲28.36
Plugin Options /wp-admin/admin.php?page=otw-wpl-options9342.0128.7237.57
Manage widget /wp-admin/admin.php?page=otw-wpl-action7201.4511.3716.43
Sidebars /wp-admin/admin.php?page=otw-wpl8871.9927.7927.75
otwfcr /wp-admin/admin.php?page=otwfcr8281.9425.2423.37
Add Sidebar /wp-admin/admin.php?page=otw-wpl-add9711.9927.6029.42
License Manager /wp-admin/admin.php?page=otw-wpl-lm9751.9625.4623.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • otw_widget_settings
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/widgetize-pages-light/include/otw_components/otw_factory/views/action_message.php
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/widgetize-pages-light/include/otw_labels/otw_sbm_factory_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/widgetize-pages-light/include/otw_process_actions.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/widgetize-pages-light/include/otw_components/otw_grid_manager/otw_grid_manager.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/widgetize-pages-light/include/otw_labels/otw_sbm_grid_manager_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/widgetize-pages-light/include/otw_sidebar_options.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/widgetize-pages-light/include/otw_components/otw_shortcode/otw_shortcode.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/widgetize-pages-light/include/otw_manage_sidebar.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widgetize-pages-light/include/otw_functions.php:163
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widgetize-pages-light/include/otw_components/otw_factory/views/license_manager.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/widgetize-pages-light/include/otw_labels/otw_wpl_grid_manager_object.labels.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Create a custom sidebar(widget area)), #2 (Use OTW Grid Manager Light to create your custom page layout and insert the sidebars. Easy in no time!), #3 (Go to your widgets section (Appearance -> Widgets) and drop some widgets in your new sidebar), #4 (Get the shortcode), #5 (Insert Sidebar ShortCode button), #6 (Select sidebar to insert), #7 (Shortcode)
The official readme.txt might help

widgetize-pages-light/otw_sidebar_manager.php 92% from 13 tests

The main PHP script in "Widgetize Pages Light" version 3.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("widgetize-pages-light.php" instead of "otw_sidebar_manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin23,819 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
CSS1999848311,916
PHP351,7941,0546,200
JavaScript8992263,002
SVG3002,701

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity97.50
▷ Minimum class complexity13.00
▷ Maximum class complexity193.00
Average method complexity5.49
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods172
▷ Static methods179.88%
▷ Public methods13377.33%
▷ Protected methods2715.70%
▷ Private methods126.98%
Functions61
▷ Named functions61100.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
49 PNG files occupy 0.44MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/otw_components/otw_grid_manager_light/img/gm-clone.png0.21KB0.24KB0.00%
screenshot-4.png47.62KB16.62KB▼ 65.09%
include/otw_components/otw_form/img/select.png0.20KB0.27KB0.00%
include/otw_components/otw_grid_manager/img/gm-edit.png0.31KB0.38KB0.00%
include/otw_components/otw_form/img/colorpicker/select.png3.20KB0.46KB▼ 85.54%