10% notice-board-by-towkir

Code Review | NOTICE BOARD BY TOWKIR

WordPress plugin NOTICE BOARD BY TOWKIR scored10%from 54 tests.

About plugin

  • Plugin page: notice-board-by-t...
  • Plugin version: 2.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1.0
  • WordPress version: 6.3.1
  • First release: Nov 4, 2021
  • Latest release: Nov 9, 2022
  • Number of updates: 13
  • Update frequency: every 28.5 days
  • Top authors: mastowkir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /947 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function add_shortcode was called incorrectly. Invalid shortcode name: notice-board count="100". Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)

Server metrics [RAM: ▼1.86MB] [CPU: ▼60.02ms] Passed 4 tests

An overview of server-side resources used by NOTICE BOARD BY TOWKIR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.25 ▼33.31
Dashboard /wp-admin2.16 ▼1.185.85 ▼59.59
Posts /wp-admin/edit.php2.16 ▼1.196.65 ▼48.19
Add New Post /wp-admin/post-new.php2.16 ▼3.726.62 ▼98.98
Media Library /wp-admin/upload.php2.16 ▼1.077.54 ▼30.81
Notices /wp-admin/edit.php?post_type=notice2.165.54
Add New Notice /wp-admin/post-new.php?post_type=notice2.166.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_notice_board_widget
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by NOTICE BOARD BY TOWKIR
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.35 ▼0.201.65 ▼0.0142.66 ▲1.85
Dashboard /wp-admin2,222 ▲425.62 ▲0.0487.23 ▼6.5638.67 ▼1.44
Posts /wp-admin/edit.php2,127 ▲241.95 ▼0.0237.38 ▼7.1133.19 ▼3.02
Add New Post /wp-admin/post-new.php1,549 ▲2123.11 ▲0.21716.13 ▲94.8254.56 ▼1.27
Media Library /wp-admin/upload.php1,430 ▲334.22 ▲0.02106.22 ▲3.0347.17 ▲3.66
Notices /wp-admin/edit.php?post_type=notice1,1001.9735.5429.79
Add New Notice /wp-admin/post-new.php?post_type=notice2,2137.51173.3262.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_shortcode was called incorrectly. Invalid shortcode name: notice-board count="100". Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_notice_board_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=notice
    • > User notice in wp-includes/functions.php+5905
    Function add_shortcode was called incorrectly. Invalid shortcode name: notice-board count="100". Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/notice-board-by-towkir/inc/widget-display.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/notice-board-by-towkir/towkir-notice-board.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/notice-board-by-towkir/inc/widget-form.php:2
    • > PHP Notice
      Undefined variable: before_widget in wp-content/plugins/notice-board-by-towkir/inc/widget-display.php on line 6

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 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Once you have installed & activate the plugin, navigate to Notices in the admin area to Add,View, Edit & Delete the notices and special announcements.)
You can look at the official readme.txt

notice-board-by-towkir/towkir-notice-board.php 85% from 13 tests

"NOTICE BOARD BY TOWKIR" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("notice-board-by-towkir.php" instead of "towkir-notice-board.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected386 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP375127308
CSS18074
JavaScript1004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin