10% announcekit

Code Review | AnnounceKit

WordPress plugin AnnounceKit scored10%from 54 tests.

About plugin

  • Plugin page: announcekit
  • Plugin version: 2.0.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.5.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2019
  • Latest release: Feb 25, 2023
  • Number of updates: 31
  • Update frequency: every 43.9 days
  • Top authors: restpack (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,181 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/announcekit/index.php+63
    Undefined index: action

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.01ms] Passed 4 tests

Analyzing server-side resources used by AnnounceKit
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.49 ▼2.14
Dashboard /wp-admin3.41 ▲0.0646.70 ▼15.43
Posts /wp-admin/edit.php3.52 ▲0.1644.63 ▼3.66
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.86 ▼10.54
Media Library /wp-admin/upload.php3.33 ▲0.1034.62 ▼2.42
Announcekit /wp-admin/options-general.php?page=announcekit/index.php3.2732.12

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
ak_
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by AnnounceKit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.25 ▼1.064.00 ▲2.2542.40 ▼0.27
Dashboard /wp-admin2,207 ▲225.80 ▼0.0194.70 ▼22.9438.54 ▼3.60
Posts /wp-admin/edit.php2,093 ▲72.00 ▲0.0233.22 ▼4.2631.30 ▼2.99
Add New Post /wp-admin/post-new.php1,536 ▲823.05 ▼0.17724.83 ▲59.8657.15 ▲5.19
Media Library /wp-admin/upload.php1,392 ▲44.22 ▼0.0392.88 ▼24.9642.43 ▼3.43
Announcekit /wp-admin/options-general.php?page=announcekit/index.php9921.8726.2677.39

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

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
Smoke test failed, please fix the following
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=announcekit/index.php
    • > Notice in wp-content/plugins/announcekit/index.php+246
    Undefined index: widget_id
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=announcekit/index.php
    • > Notice in wp-content/plugins/announcekit/index.php+253
    Undefined index:
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=announcekit/index.php
    • > Notice in wp-content/plugins/announcekit/index.php+253
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=announcekit/index.php
    • > Notice in wp-content/plugins/announcekit/index.php+317
    Undefined index: hidden
    • > GET request to /wp-admin/options-general.php?page=announcekit/index.php
    • > Notice in wp-content/plugins/announcekit/index.php+322
    Undefined index: textarea
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=announcekit/index.php
    • > Notice in wp-content/plugins/announcekit/index.php+280
    Undefined index: readonly
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=announcekit/index.php
    • > Notice in wp-content/plugins/announcekit/index.php+344
    Undefined index: placeholder

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/announcekit/index.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: changelog, news, newsfeed, announcement, user feedback

announcekit/index.php 92% from 13 tests

This is the main PHP file of "AnnounceKit" version 2.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("announcekit.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin502 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP111512453
JavaScript113048
CSS1061

PHP code Passed 2 tests

Analyzing 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.36
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/be-banner.png3.95KB3.94KB0.15%