79% zaki-notifications-hider

Code Review | Zaki Notifications Hider

WordPress plugin Zaki Notifications Hider scored79%from 54 tests.

About plugin

  • Plugin page: zaki-notification...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Sep 9, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: r.conte (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /795 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Zaki Notifications Hider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.11 ▼1.43
Dashboard /wp-admin3.32 ▲0.0248.16 ▼0.40
Posts /wp-admin/edit.php3.37 ▲0.0250.05 ▲2.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.21 ▼17.18
Media Library /wp-admin/upload.php3.24 ▲0.0235.37 ▲1.87
Notifications Hider /wp-admin/admin.php?page=zaki-notifications-hider3.1830.19
Zaki Plugins /wp-admin/admin.php?page=zaki3.1829.00

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
zaki_notifyhider_options

Browser metrics Passed 4 tests

A check of browser resources used by Zaki Notifications Hider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.56 ▼0.821.67 ▲0.1742.82 ▲4.07
Dashboard /wp-admin2,232 ▲405.87 ▲0.92109.08 ▼8.5764.19 ▲22.96
Posts /wp-admin/edit.php2,118 ▲292.02 ▲0.0338.38 ▼1.8934.26 ▼1.21
Add New Post /wp-admin/post-new.php1,540 ▲2623.13 ▲5.47724.93 ▲121.6559.22 ▲4.47
Media Library /wp-admin/upload.php1,417 ▲294.21 ▼0.0194.74 ▼5.1078.45 ▲34.38
Notifications Hider /wp-admin/admin.php?page=zaki-notifications-hider8302.0226.3234.92
Zaki Plugins /wp-admin/admin.php?page=zaki8012.0222.9125.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • zaki_notifyhider_options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=zaki
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=zaki
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=zaki
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ZakiPlugins::zakiPluginsMainPageHtml() should not be called statically

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/zaki-notifications-hider/zaki-notifications-hider.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: update, hide, plugins

zaki-notifications-hider/zaki-notifications-hider.php Passed 13 tests

The entry point to "Zaki Notifications Hider" version 1.0 is a PHP file that has certain tags in its header comment area
76 characters long description:
Plugin that allow you to hide update notifications for each plugin installed

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected133 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22723133

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods266.67%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/zaki-icon.png0.34KB0.31KB▼ 9.12%