74% simple-notification

Code Review | Simple Notification

WordPress plugin Simple Notification scored74%from 54 tests.

About plugin

  • Plugin page: simple-notification
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Feb 13, 2021
  • Latest release: Nov 1, 2022
  • Number of updates: 15
  • Update frequency: every 41.8 days
  • Top authors: appsbd (80%)sarwarcse (26.67%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,124 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.99MB] [CPU: ▲0.63ms] Passed 4 tests

An overview of server-side resources used by Simple Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.61 ▲1.1545.77 ▲6.25
Dashboard /wp-admin4.29 ▲0.9950.61 ▲1.46
Posts /wp-admin/edit.php4.34 ▲0.9957.13 ▲7.89
Add New Post /wp-admin/post-new.php6.87 ▲0.9987.88 ▼13.09
Media Library /wp-admin/upload.php4.21 ▲0.9943.51 ▲9.30

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 176 new files
Database: 1 new table, 6 new options
New tables
wp_apbd_simple_notification
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Notification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20113.64 ▼0.756.09 ▲4.3037.75 ▼7.54
Dashboard /wp-admin2,233 ▲454.83 ▼0.23108.05 ▼11.6337.63 ▼9.57
Posts /wp-admin/edit.php2,116 ▲272.04 ▲0.0337.93 ▼1.8736.76 ▲2.95
Add New Post /wp-admin/post-new.php1,540 ▲723.18 ▲0.28655.83 ▼11.9462.87 ▲8.47
Media Library /wp-admin/upload.php1,415 ▲274.18 ▼0.0198.67 ▼8.3043.17 ▼0.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_apbd_simple_notification
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function APBD_LoadCore() in wp-content/plugins/simple-notification/appcore/APBD_Simple_Notification_base.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mapbd_simple_notification' not found in wp-content/plugins/simple-notification/views/apbd_simple_notification/add.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function APBD_LoadCore() in wp-content/plugins/simple-notification/core/AppsBDKarnelLite.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AppsBDLiteModule' not found in wp-content/plugins/simple-notification/modules/Apbd_aboutus_recommended.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-notification/template/popup-msg.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-notification/template/popup.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'AppsBDLiteModule' not found in wp-content/plugins/simple-notification/modules/Apbd_simple_notification.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-notification/views/apbd_aboutus_recommended/main.php:9
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/simple-notification/template/main.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'AppsBDLiteModule' not found in wp-content/plugins/simple-notification/modules/Apbd_notification_video.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #3, #4, #5, #6, #7 in simple-notification/assets to your readme.txt
You can look at the official readme.txt

simple-notification/simple-notification.php Passed 13 tests

The principal PHP file in "Simple Notification" v. 1.3 is loaded by WordPress automatically on each request
27 characters long description:
Sale promotion notification

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin75,739 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript295,5336,55325,680
CSS415,40224024,997
SVG9009,798
Sass291,163349,483
PHP268025695,779
LESS1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity47.50
▷ Minimum class complexity1.00
▷ Maximum class complexity362.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes318.75%
▷ Concrete classes1381.25%
▷ Final classes00.00%
Methods404
▷ Static methods4811.88%
▷ Public methods37993.81%
▷ Protected methods225.45%
▷ Private methods30.74%
Functions67
▷ Named functions6698.51%
▷ Anonymous functions11.49%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.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
6 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/recommended/elite-addons.png61.15KB20.97KB▼ 65.70%
images/onlystyle.png57.11KB25.21KB▼ 55.86%
images/recommended/multicurrency.png7.13KB3.07KB▼ 56.97%
images/menu_icon.png2.31KB1.71KB▼ 25.92%
images/recommended/woolentor.png3.73KB3.92KB0.00%