68% wp-custom-widget-area

Code Review | WP Custom Widget area

WordPress plugin WP Custom Widget area scored 68% from 54 tests.

About plugin

  • Plugin page: wp-custom-widget-...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Nov 27, 2014
  • Latest release: Dec 14, 2016
  • Number of updates: 50
  • Update frequency: every 15.1 days
  • Top authors: krozero199 (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

10,000+ active / 110,088 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by WP Custom Widget area
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.89 ▼5.18
Dashboard /wp-admin3.34 ▲0.0446.84 ▲1.04
Posts /wp-admin/edit.php3.39 ▲0.0345.03 ▼2.32
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.67 ▼7.11
Media Library /wp-admin/upload.php3.26 ▲0.0340.12 ▲8.06
Menu Locations /wp-admin/admin.php?page=custom_menu_location3.2431.03
Custom Widget Area /wp-admin/admin.php?page=custom_widget_area3.2432.96
Help /wp-admin/admin.php?page=cwa_help3.2330.65

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: 1 new table, 7 new options
New tables
wp_cwa
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
kz_db_version
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Custom Widget area
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.78 ▲0.491.87 ▼0.5443.55 ▼5.26
Dashboard /wp-admin2,234 ▲465.84 ▼0.0695.29 ▼5.8839.70 ▼1.37
Posts /wp-admin/edit.php2,120 ▲282.05 ▲0.0535.76 ▼3.2232.74 ▼3.72
Add New Post /wp-admin/post-new.php1,539 ▲1117.59 ▼0.65654.10 ▲23.5054.14 ▼0.20
Media Library /wp-admin/upload.php1,419 ▲344.16 ▼0.1399.22 ▼1.8342.22 ▼0.65
Menu Locations /wp-admin/admin.php?page=custom_menu_location9191.7225.4829.48
Custom Widget Area /wp-admin/admin.php?page=custom_widget_area1,0821.7327.5529.15
Help /wp-admin/admin.php?page=cwa_help1,2602.2927.0971.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 1 table in the database
    • wp_cwa
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • kz_db_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-custom-widget-area/includes/config.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cwa_help
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-custom-widget-area/admin/js/jquery.hashchange.min.js?ver=1.2.5 8:686 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
    • > GET request to /wp-admin/admin.php?page=cwa_help
    • > Network (severe)
    wp-content/plugins/wp-custom-widget-area/admin/img/help/cwa_widget_advanced_1.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=cwa_help
    • > Network (severe)
    wp-content/plugins/wp-custom-widget-area/admin/img/help/cwa_widget_advanced_2.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-custom-widget-area === )
You can take inspiration from this readme.txt

wp-custom-widget-area/wp-custom-widget-area.php Passed 13 tests

The main PHP file in "WP Custom Widget area" ver. 1.2.5 adds more information about the plugin and also serves as the entry point for this plugin
56 characters long description:
A wordpress plugin to create custom dynamic widget area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2,686 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52872681,151
PHP132445331,051
CSS63314484

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods53
▷ Static methods23.77%
▷ Public methods4890.57%
▷ Protected methods00.00%
▷ Private methods59.43%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
23 PNG files occupy 3.90MB with 2.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/help/cwa_widget_shortcode_display.png183.81KB51.28KB▼ 72.10%
admin/img/help/cwa_widget_codebase.png398.03KB118.04KB▼ 70.34%
admin/img/help/cwa_widget_display.png192.87KB50.94KB▼ 73.59%
admin/img/x.png1.04KB1.25KB0.00%
admin/img/help/cwa_1_edit_save.png165.49KB44.87KB▼ 72.89%