10% ciusan-restrict-widget

Code Review | Ciusan Restrict Widget

WordPress plugin Ciusan Restrict Widget scored10%from 54 tests.

About plugin

  • Plugin page: ciusan-restrict-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2015
  • Latest release: Feb 21, 2015
  • Number of updates: 23
  • Update frequency: every 1.0 days
  • Top authors: k0z3y (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,410 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ciusan-restrict-widget/ciusan-restrict-widget.php+153
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼49.47ms] Passed 4 tests

Server-side resources used by Ciusan Restrict Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.66 ▼36.21
Dashboard /wp-admin2.10 ▼1.215.97 ▼40.71
Posts /wp-admin/edit.php2.10 ▼1.267.90 ▼39.62
Add New Post /wp-admin/post-new.php2.10 ▼3.795.72 ▼81.35
Media Library /wp-admin/upload.php2.10 ▼1.135.08 ▼32.25

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_ciusan_restrict_widget
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Ciusan Restrict Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.151.71 ▼0.2939.78 ▼2.97
Dashboard /wp-admin2,203 ▲185.83 ▲0.9294.87 ▼14.7739.17 ▼2.88
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0439.11 ▲1.1335.19 ▲0.95
Add New Post /wp-admin/post-new.php1,534 ▲2023.18 ▲5.53642.69 ▼49.0254.19 ▼8.65
Media Library /wp-admin/upload.php1,385 ▼04.23 ▲0.0197.18 ▼6.2741.47 ▼2.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/ciusan-restrict-widget/ciusan-restrict-widget.php+153
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_ciusan_restrict_widget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ciusan-restrict-widget/ciusan-restrict-widget.php:60

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Widget sidebar option.)
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

ciusan-restrict-widget/ciusan-restrict-widget.php Passed 13 tests

The main PHP script in "Ciusan Restrict Widget" version 1.0 is automatically included on every request by WordPress
82 characters long description:
Ciusan Restrict Widget can show widget for register user only or for guest only...

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22322110

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.50KB8.20KB▼ 70.20%