10% notifications-for-serverchan

Code Review | Notifications For ServerChan

WordPress plugin Notifications For ServerChan scored10%from 54 tests.

About plugin

  • Plugin page: notifications-for...
  • Plugin version: 0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 6, 2018
  • Latest release: Nov 7, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: bestony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 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
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/notifications-for-serverchan/notifications-for-serverchan.php+19
    The use statement with non-compound name 'ServerChan' has no effect

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.43ms] Passed 4 tests

Server-side resources used by Notifications For ServerChan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.81 ▲10.65
Dashboard /wp-admin3.32 ▼0.0345.86 ▼12.63
Posts /wp-admin/edit.php3.37 ▲0.0146.22 ▲1.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.11 ▼5.23
Media Library /wp-admin/upload.php3.24 ▲0.0133.05 ▼1.39
Notifications For ServerChan /wp-admin/options-general.php?page=notifications_for_serverchan3.1828.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Notifications For ServerChan
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.21 ▼1.204.73 ▲3.0642.77 ▲2.06
Dashboard /wp-admin2,210 ▲185.84 ▲0.89107.82 ▲2.3141.57 ▲0.08
Posts /wp-admin/edit.php2,096 ▲102.03 ▲0.0439.49 ▲4.7535.58 ▲1.73
Add New Post /wp-admin/post-new.php1,532 ▲1322.70 ▼0.40659.42 ▼6.0056.58 ▲3.25
Media Library /wp-admin/upload.php1,389 ▲44.21 ▲0.0094.24 ▼5.1144.75 ▲0.18
Notifications For ServerChan /wp-admin/options-general.php?page=notifications_for_serverchan7952.0623.9635.53

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 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=notifications_for_serverchan
    • > Notice in wp-content/plugins/notifications-for-serverchan/admin/init.php+63
    Trying to access array offset on value of type bool

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 add_action() in wp-content/plugins/notifications-for-serverchan/admin/init.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-for-serverchan/admin/init.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-for-serverchan/events/user.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notifications-for-serverchan/events/user.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: notification

notifications-for-serverchan/notifications-for-serverchan.php Passed 13 tests

The main PHP file in "Notifications For ServerChan" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
39 characters long description:
A Notifications Plugin For ServerChan

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 plugin122 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP63612122

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected