93% wp-pnotify

Code Review | WP PNotify

WordPress plugin WP PNotify scored 93% from 54 tests.

About plugin

  • Plugin page: wp-pnotify
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 5.8.1
  • First release: Dec 7, 2015
  • Latest release: Dec 10, 2015
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: rksh8148 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 697 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.16ms] Passed 4 tests

A check of server-side resources used by WP PNotify
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1343.38 ▲22.72
Dashboard /wp-admin3.07 ▲0.0248.66 ▲3.27
Posts /wp-admin/edit.php3.12 ▲0.0145.19 ▼0.11
Add New Post /wp-admin/post-new.php5.43 ▼0.0188.81 ▼566.45
Media Library /wp-admin/upload.php3.01 ▲0.0132.02 ▼1.36

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP PNotify
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲19216.24 ▲0.6413.84 ▲4.2045.05 ▲0.30
Dashboard /wp-admin2,970 ▲336.12 ▲0.12149.55 ▼11.49113.23 ▲6.66
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0165.92 ▼1.9182.62 ▼2.19
Add New Post /wp-admin/post-new.php1,615 ▼2,07221.34 ▲6.24298.87 ▼185.24104.14 ▼17.76
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.02157.72 ▼8.94116.59 ▼0.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-pnotify/wp-pnotify.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-pnotify === )
  • Screenshots: Please add images for these screenshots: #1 (Screen shot for notification.), #2 (Screen shot for shortcode used in editor.)
The official readme.txt is a good inspiration

wp-pnotify/wp-pnotify.php 92% from 13 tests

The main file in "WP PNotify" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

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 plugin127 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1163078
JavaScript10548
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.63MB with 0.40MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png322.55KB116.04KB▼ 64.03%
screenshot-2.png325.63KB127.04KB▼ 60.99%