10% wp-gap-notification

Code Review | Wp Gap Notifications

WordPress plugin Wp Gap Notifications scored10%from 54 tests.

About plugin

  • Plugin page: wp-gap-notification
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 14, 2018
  • Latest release: Jun 15, 2018
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: mojtaba455 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,062 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-gap-notification/inc/Wgn_notific.class.php+357
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Server metrics [RAM: ▼1.82MB] [CPU: ▼52.83ms] Passed 4 tests

An overview of server-side resources used by Wp Gap Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.305.45 ▼33.67
Dashboard /wp-admin2.19 ▼1.125.67 ▼43.43
Posts /wp-admin/edit.php2.19 ▼1.176.57 ▼40.75
Add New Post /wp-admin/post-new.php2.19 ▼3.705.56 ▼93.45
Media Library /wp-admin/upload.php2.19 ▼1.056.56 ▼28.78

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_wgn_logs
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Wp Gap Notifications
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.26 ▼1.391.72 ▼0.1240.72 ▼2.26
Dashboard /wp-admin2,221 ▲305.83 ▲0.92115.28 ▲6.2695.85 ▲50.38
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0638.89 ▼0.5334.72 ▼3.12
Add New Post /wp-admin/post-new.php7,425 ▲5,89226.63 ▲3.541,022.45 ▲398.8559.11 ▲8.08
Media Library /wp-admin/upload.php1,403 ▲184.23 ▼0.04112.93 ▲7.9649.24 ▲4.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/wp-gap-notification/inc/Wgn_notific.class.php+357
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-gap-notification/admin/settings-page.php
    • > /wp-content/plugins/wp-gap-notification/settings-page.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-gap-notification/inc/Wgn_notific.class.php on line 357

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
9 plugin tags: email, gap, notifications, iranan social, plugin...

wp-gap-notification/wp-gap-notifications.php 85% from 13 tests

The primary PHP file in "Wp Gap Notifications" version 1.1.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-gap-notification.php" instead of "wp-gap-notifications.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected2,377 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7933001,802
PO File1151180354
JavaScript32330209
Markdown16012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1173.33%
▷ Protected methods213.33%
▷ Private methods213.33%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png14.97KB1.00KB▼ 93.29%