84% notice-block

Code Review | Notice Block

WordPress plugin Notice Block scored 84% from 54 tests.

About plugin

  • Plugin page: notice-block
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2020
  • Latest release: Dec 12, 2022
  • Number of updates: 13
  • Update frequency: every 66.7 days
  • Top authors: priyomukul (84.62%)alam789 (15.38%)re_enter_rupok (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,424 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼1.63ms] Passed 4 tests

This is a short check of server-side resources used by Notice Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.06 ▼5.67
Dashboard /wp-admin3.42 ▲0.1245.83 ▼5.23
Posts /wp-admin/edit.php3.53 ▲0.1847.20 ▲3.64
Add New Post /wp-admin/post-new.php6.03 ▲0.1596.53 ▲8.12
Media Library /wp-admin/upload.php3.34 ▲0.1136.26 ▲0.76

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Notice Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.14 ▼1.241.63 ▼0.2241.51 ▼4.81
Dashboard /wp-admin2,203 ▲125.84 ▲0.9594.20 ▼9.1135.75 ▼7.51
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0241.58 ▲5.8335.16 ▼0.88
Add New Post /wp-admin/post-new.php1,648 ▲10624.52 ▲6.08658.02 ▲1.3238.14 ▼14.28
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.06102.76 ▲4.3146.08 ▼0.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/notice-block/notice-block.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

notice-block/notice-block.php Passed 13 tests

The main PHP script in "Notice Block" version 1.3.4 is automatically included on every request by WordPress
70 characters long description:
Put Spotlight On News, Announcements & Let The Visitors Find It Easily

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected692 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP10111128586
JavaScript715889
JSON20015
CSS3262

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity24.00
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods26
▷ Static methods1038.46%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin