10% new-post-in-category-notifier

Code Review | New Post In Category Notifier

WordPress plugin New Post In Category Notifier scored 10% from 54 tests.

About plugin

  • Plugin page: new-post-in-categ...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 5.8.1
  • First release: Mar 21, 2014
  • Latest release: Mar 21, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: hpaavola (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 475 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/new-post-in-category-notifier/post_in_tag_notifier.php+47
    Undefined variable: id

Server metrics [RAM: ▲0.02MB] [CPU: ▼137.88ms] Passed 4 tests

This is a short check of server-side resources used by New Post In Category Notifier
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0237.76 ▲0.65
Dashboard /wp-admin3.09 ▲0.0456.63 ▲8.31
Posts /wp-admin/edit.php3.14 ▲0.0350.05 ▲1.99
Add New Post /wp-admin/post-new.php5.45 ▲0.0198.43 ▼554.49
Media Library /wp-admin/upload.php3.03 ▲0.0333.45 ▲0.35
New Post In Tag Options /wp-admin/options-general.php?page=notify_options_id3.0029.35

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: 1 new table, no new options
New tables
wp_postintagnotify

Browser metrics Passed 4 tests

An overview of browser requirements for New Post In Category Notifier
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.26 ▲0.7211.64 ▲1.7647.19 ▼4.94
Dashboard /wp-admin2,975 ▲445.97 ▼0.07146.55 ▼31.01109.56 ▲1.71
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0268.04 ▼5.3286.72 ▲4.84
Add New Post /wp-admin/post-new.php1,618 ▼6521.37 ▲2.63305.20 ▼130.71107.30 ▼6.72
Media Library /wp-admin/upload.php1,812 ▲55.04 ▲0.01153.69 ▲8.11115.54 ▼7.68
New Post In Tag Options /wp-admin/options-general.php?page=notify_options_id1,0512.0655.7568.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_postintagnotify

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/new-post-in-category-notifier/post_in_tag_notifier.php:135

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: email, notify

new-post-in-category-notifier/post_in_tag_notifier.php 92% from 13 tests

The primary PHP file in "New Post In Category Notifier" version 0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("new-post-in-category-notifier.php" instead of "post_in_tag_notifier.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin112 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1178112

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin