78% jquery-notify

Code Review | jQuery Notify

WordPress plugin jQuery Notify scored 78% from 54 tests.

About plugin

  • Plugin page: jquery-notify
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Jul 10, 2012
  • Latest release: Aug 10, 2015
  • Number of updates: 21
  • Update frequency: every 53.6 days
  • Top authors: mindshare (71.43%)sekatsim (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.20ms] Passed 4 tests

A check of server-side resources used by jQuery Notify
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.81 ▼3.89
Dashboard /wp-admin3.40 ▲0.1043.34 ▼3.43
Posts /wp-admin/edit.php3.51 ▲0.1644.82 ▼3.93
Add New Post /wp-admin/post-new.php5.98 ▲0.0989.60 ▼1.53
Media Library /wp-admin/upload.php3.32 ▲0.0936.01 ▲0.95
jQuery Notify /wp-admin/options-general.php?page=jqn-options3.2931.24

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
jqn_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for jQuery Notify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.59 ▼0.791.93 ▼0.1942.97 ▼2.73
Dashboard /wp-admin2,213 ▲224.87 ▼0.1898.39 ▼1.2140.70 ▼1.44
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0638.76 ▼0.1133.80 ▼2.18
Add New Post /wp-admin/post-new.php1,552 ▲3218.11 ▼5.14612.31 ▼31.3062.71 ▲11.01
Media Library /wp-admin/upload.php1,389 ▲44.28 ▲0.0494.61 ▼3.7041.81 ▼0.15
jQuery Notify /wp-admin/options-general.php?page=jqn-options1,0782.0238.6633.65

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • jqn_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'jQuery_Notify' not found in wp-content/plugins/jquery-notify/jqn-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/jquery-notify/jquery-notify.php:38

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=jqn-options
    • > Console-api (warning) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'mozilla')" "TypeError: Cannot read properties of undefined (reading 'mozilla')\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=jqn-options:235:19)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:26990)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=jqn-options
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'mozilla')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The plugin in action, using the "success" style), #2 (The plugin in action, using the "default" style), #3 (The plugin in action, using the "error" style)
The official readme.txt might help

jquery-notify/jquery-notify.php Passed 13 tests

"jQuery Notify" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
77 characters long description:
An attractive, lightweight, and highly configurable jQuery notification pane.

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
Good job! No executable or dangerous file extensions detected582 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2145112408
CSS2190148
JavaScript16324
Markdown1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity20.50
▷ Minimum class complexity7.00
▷ Maximum class complexity34.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
4 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
close.png0.17KB0.11KB▼ 37.99%
screenshot-1.png25.36KB11.80KB▼ 53.49%
screenshot-3.png25.08KB11.86KB▼ 52.72%
screenshot-2.png25.95KB11.97KB▼ 53.86%