84% genesis-widget-toggle

Code Review | Genesis Widget Toggle

WordPress plugin Genesis Widget Toggle scored84%from 54 tests.

About plugin

  • Plugin page: genesis-widget-to...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Sep 30, 2012
  • Latest release: Sep 11, 2013
  • Number of updates: 26
  • Update frequency: every 13.6 days
  • Top authors: aprakasa (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /7,806 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.60ms] Passed 4 tests

This is a short check of server-side resources used by Genesis Widget Toggle
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.05 ▼4.88
Dashboard /wp-admin3.31 ▲0.0047.64 ▼9.03
Posts /wp-admin/edit.php3.36 ▲0.0050.64 ▼0.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.34 ▼11.97
Media Library /wp-admin/upload.php3.23 ▲0.0034.50 ▼0.53

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Genesis Widget Toggle
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.191.90 ▲0.1739.35 ▼4.08
Dashboard /wp-admin2,206 ▲185.85 ▼0.03102.10 ▼1.8246.17 ▲3.57
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0235.97 ▼4.7837.31 ▼2.64
Add New Post /wp-admin/post-new.php1,542 ▼518.16 ▼0.13623.35 ▼2.2560.94 ▲9.28
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.16101.95 ▲2.9544.90 ▲4.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis_Admin_Boxes' not found in wp-content/plugins/genesis-widget-toggle/admin/admin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/genesis-widget-toggle/genesis-widget-toggle.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === genesis-widget-toggle === )
You can take inspiration from this readme.txt

genesis-widget-toggle/genesis-widget-toggle.php Passed 13 tests

The primary PHP file in "Genesis Widget Toggle" version 0.3 is used by WordPress to initiate all plugin functionality
61 characters long description:
Genesis widget toggle add additional widget area with toggle.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin885 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4011458
PHP354136267
CSS20083
PO File1282877

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.50
▷ Minimum class complexity3.00
▷ Maximum class complexity24.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin