78% limit-widgets

Code Review | Limit Widgets

WordPress plugin Limit Widgets scored 78% from 54 tests.

About plugin

  • Plugin page: limit-widgets
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Oct 12, 2012
  • Latest release: Feb 12, 2015
  • Number of updates: 17
  • Update frequency: every 50.2 days
  • Top authors: welcher (52.94%)BFTrick (52.94%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 3,410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Limit Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.05 ▼7.45
Dashboard /wp-admin3.35 ▲0.0447.65 ▼4.01
Posts /wp-admin/edit.php3.40 ▲0.0448.79 ▲2.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0396.17 ▲0.07
Media Library /wp-admin/upload.php3.27 ▲0.0436.58 ▲0.96

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Limit Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.51 ▼0.861.94 ▲0.0739.61 ▼7.14
Dashboard /wp-admin2,210 ▲284.84 ▼1.23115.47 ▲10.0343.37 ▼2.43
Posts /wp-admin/edit.php2,096 ▲41.97 ▼0.0541.02 ▼1.0938.32 ▲0.47
Add New Post /wp-admin/post-new.php1,537 ▲1623.26 ▲0.01592.30 ▼18.2957.76 ▲6.93
Media Library /wp-admin/upload.php1,389 ▲14.18 ▼0.03100.00 ▼5.4743.51 ▼2.35
Limit Widgets /wp-admin/options-limit-widgets.php260.440.0812.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following items
  • 1× 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/limit-widgets/plugin.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-limit-widgets.php
    • > Network (severe)
    wp-admin/options-limit-widgets.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tested up to: Invalid plugin version format
The official readme.txt might help

limit-widgets/plugin.php 85% from 13 tests

This is the main PHP file of "Limit Widgets" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("limit-widgets.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin157 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14444107
JavaScript1182142
CSS1108

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin