10% cat-signal

Code Review | Internet Defense League Cat Signal

WordPress plugin Internet Defense League Cat Signal scored 10% from 54 tests.

About plugin

  • Plugin page: cat-signal
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.0
  • WordPress version: 5.8.1
  • First release: Mar 20, 2013
  • Latest release: Dec 8, 2018
  • Number of updates: 28
  • Update frequency: every 74.6 days
  • Top authors: jazzs3quence (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

200+ active / 9,827 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/cat-signal/cat-signal.php+250
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.82MB] [CPU: ▼198.35ms] Passed 4 tests

This is a short check of server-side resources used by Internet Defense League Cat Signal
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼1.027.53 ▼27.93
Dashboard /wp-admin1.83 ▼1.225.78 ▼54.18
Posts /wp-admin/edit.php1.83 ▼1.286.81 ▼47.58
Add New Post /wp-admin/post-new.php1.83 ▼3.606.53 ▼656.51
Media Library /wp-admin/upload.php1.83 ▼1.187.43 ▼35.12
Cat Signal /wp-admin/options-general.php?page=cat_signal1.839.48

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Internet Defense League Cat Signal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,714 ▲14216.08 ▲0.4511.18 ▲2.1051.00 ▲1.91
Dashboard /wp-admin2,978 ▲446.05 ▲0.10160.19 ▼1.74114.96 ▼0.88
Posts /wp-admin/edit.php2,747 ▲82.72 ▲0.01108.88 ▲35.7797.53 ▲3.81
Add New Post /wp-admin/post-new.php1,689 ▲7416.21 ▼4.75389.58 ▲56.97109.26 ▼7.56
Media Library /wp-admin/upload.php1,815 ▲85.04 ▲0.00191.37 ▲11.17128.05 ▲2.80
Cat Signal /wp-admin/options-general.php?page=cat_signal1,1782.0959.5593.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/cat-signal/cat-signal.php+250
    Trying to access array offset on value of type bool

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cat_signal
    • > Notice in wp-content/plugins/cat-signal/cat-signal.php+80
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=cat_signal
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=cat_signal
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cat_signal
    • > Notice in wp-content/plugins/cat-signal/cat-signal.php+118
    Undefined index: location

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cat-signal/cat-signal.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: cat signal, internet defense league, online activism, freedom, activism

cat-signal/cat-signal.php 92% from 13 tests

"Internet Defense League Cat Signal" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 190 characters long)

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
There were no executable files found in this plugin329 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12535241
Markdown134070
JavaScript20018

PHP code Passed 2 tests

A short 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.26
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.96MB with 0.67MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/banner.png74.63KB22.21KB▼ 70.24%
img/StopSecrecy.png36.89KB15.40KB▼ 58.26%
img/modal.png59.84KB20.89KB▼ 65.10%
img/icon.png783.47KB10.94KB▼ 98.60%
img/icon-256x256.png12.33KB5.54KB▼ 55.05%